X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=framework%2Fmain%2Fthird_party%2Fphp_mailer%2Fexamples%2Ftest_mail.php;fp=framework%2Fmain%2Fthird_party%2Fphp_mailer%2Fexamples%2Ftest_mail.php;h=6e0ac2fd940a59f9c590c15fbc35b42bf215571c;hb=78a010fef84895720e796842208f01dfb619c332;hp=0000000000000000000000000000000000000000;hpb=7629f2314d517561d4301ddfb068a797b6ed8700;p=core.git diff --git a/framework/main/third_party/php_mailer/examples/test_mail.php b/framework/main/third_party/php_mailer/examples/test_mail.php new file mode 100644 index 00000000..6e0ac2fd --- /dev/null +++ b/framework/main/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!"; +} + +?>