setFrom('from@example.com', 'From Name'); $mail->addAddress('to@example.com', 'To Name'); $mail->Subject = 'Test Email'; $mail->Body = 'This is a test email.'; if(!$mail->send()) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo; } else { echo 'Message has been sent.'; } ?>This code uses the PHPMailer package to send an email. The package is included using the "require" statement and initialized with the "new" keyword. The email is then composed using the setFrom, addAddress, Subject, and Body methods, and sent using the send method. If the email fails to send, the error message is displayed. In summary, PHP is a versatile programming language widely used for web development. Examples of its usage include simple scripts like the Hello World program, forms processing, and email sending using packages like PHPMailer.