require_once 'path/to/PHPMailerAutoload.php'; $mail = new PHPMailer; $mail->setFrom('your@email.com', 'Your Name'); $mail->addAddress('recipient@email.com', 'Recipient Name'); $mail->Subject = 'Subject of the email'; $mail->Body = 'Body of the email'; if(!$mail->send()) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo; } else { echo 'Message has been sent'; }
$mail = new PHPMailer; $mail->setFrom('your@email.com', 'Your Name'); $mail->addAddress('recipient@email.com', 'Recipient Name'); $mail->Subject = 'Subject of the email'; $mail->isHTML(true); $mail->Body = 'HTML Content
Hello, this is an HTML email.
'; if(!$mail->send()) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo; } else { echo 'Message has been sent'; }
$mail = new PHPMailer; $mail->setFrom('your@email.com', 'Your Name'); $mail->addAddress('recipient@email.com', 'Recipient Name'); $mail->Subject = 'Subject of the email'; $mail->Body = 'Body of the email'; // Attachments $mail->addAttachment('/path/to/file.pdf', 'File.pdf'); $mail->addAttachment('/path/to/image.jpg', 'Image.jpg'); if(!$mail->send()) { echo 'Message could not be sent.'; echo 'Mailer Error: ' . $mail->ErrorInfo; } else { echo 'Message has been sent'; }Based on the code examples and the package name, it can be determined that PHP FD mailer is a package/library for sending emails using PHP.