X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=framework%2Fmain%2Fthird_party%2Fphp_mailer%2Fexamples%2Ftest_smtp.php;fp=framework%2Fmain%2Fthird_party%2Fphp_mailer%2Fexamples%2Ftest_smtp.php;h=d8da32b0c0bf1245ebdf14d1d6f7be9cfce168c8;hb=78a010fef84895720e796842208f01dfb619c332;hp=0000000000000000000000000000000000000000;hpb=7629f2314d517561d4301ddfb068a797b6ed8700;p=core.git diff --git a/framework/main/third_party/php_mailer/examples/test_smtp.php b/framework/main/third_party/php_mailer/examples/test_smtp.php new file mode 100644 index 00000000..d8da32b0 --- /dev/null +++ b/framework/main/third_party/php_mailer/examples/test_smtp.php @@ -0,0 +1,39 @@ +getFile('contents.html'); +$body = eregi_replace("[\]",'',$body); + +$mail->IsSMTP(); // telling the class to use SMTP +$mail->Host = "mail.worxteam.com"; // SMTP server + +$mail->From = "name@yourdomain.com"; +$mail->FromName = "First Last"; + +$mail->Subject = "PHPMailer Test Subject via smtp"; + +$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!"; +} + +?>