X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fphpmailer%2Fexamples%2Ftest_sendmail.php;h=e56117c096c7f20d5afd9a9227c41cfd2e719ece;hp=f0311665e4f5dc4b09fae58ceb5b19e512d8719b;hb=9a60a71dde1189e5c922a6dd377b862d08ea8f51;hpb=3010e02e68f51325da31625a29fe940646f6ff04 diff --git a/inc/phpmailer/examples/test_sendmail.php b/inc/phpmailer/examples/test_sendmail.php index f0311665e4..e56117c096 100644 --- a/inc/phpmailer/examples/test_sendmail.php +++ b/inc/phpmailer/examples/test_sendmail.php @@ -1,30 +1,30 @@ -getFile('contents.html'); -$body = eregi_replace("[\]",'',$body); - -$mail->IsSendmail(); // telling the class to use SendMail transport - -$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!"; -} - -?> +getFile('contents.html'); +$body = eregi_replace("[\]",'',$body); + +$mail->IsSendmail(); // telling the class to use SendMail transport + +$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!"; +} + +?>