X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fclasses%2Fthird_party%2Fphp_mailer%2Fexamples%2Ftest_mail.php;fp=inc%2Fclasses%2Fthird_party%2Fphp_mailer%2Fexamples%2Ftest_mail.php;h=e87056e91750c1bf7895a2fc9b39c12e502350ca;hp=0000000000000000000000000000000000000000;hb=2230a2e7e09b6b47fe3d68181a28a4435c1732e6;hpb=4365745a3952764d684556852c31d0e8cba5e58e diff --git a/inc/classes/third_party/php_mailer/examples/test_mail.php b/inc/classes/third_party/php_mailer/examples/test_mail.php new file mode 100644 index 0000000000..e87056e917 --- /dev/null +++ b/inc/classes/third_party/php_mailer/examples/test_mail.php @@ -0,0 +1,29 @@ +getFile('contents.html'); +$body = eregi_replace("[\]",'',$body); + +$mail->From = "name@yourdomain.com"; +$mail->FromName = "First Last"; + +$mail->Subject = "PHPMailer Test Subject via mail()"; + +$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test + +$mail->MsgHTML($body); + +$mail->AddAddress("whoto@otherdomain.com", "John Doe"); + +$mail->AddAttachment("images/phpmailer.gif"); // attachment + +if(!$mail->Send()) { + echo "Mailer Error: " . $mail->ErrorInfo; +} else { + echo "Message sent!"; +} + +?>