X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fphpmailer%2Fexamples%2Ftest_mail.php;h=6e0ac2fd940a59f9c590c15fbc35b42bf215571c;hb=3c311675e341584ad25c561a5a65198f3717125f;hp=e87056e91750c1bf7895a2fc9b39c12e502350ca;hpb=dbe56bb043ba16ca1ec1e9efa9effdc1f0612261;p=mailer.git diff --git a/inc/phpmailer/examples/test_mail.php b/inc/phpmailer/examples/test_mail.php index e87056e917..6e0ac2fd94 100644 --- a/inc/phpmailer/examples/test_mail.php +++ b/inc/phpmailer/examples/test_mail.php @@ -1,29 +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!"; -} - -?> +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!"; +} + +?>