Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code>&lt;?php /** * Simple example script using PHPMailer with exceptions enabled * @package phpmailer * @version $Id$ */ require ('../class.phpmailer.php'); try { $mail = new PHPMailer(true); //New instance, with exceptions enabled $body = "Please return read receipt to me."; $body = preg_replace('/\\\\/','', $body); //Strip backslashes $mail-&gt;IsSMTP(); // tell the class to use SMTP $mail-&gt;SMTPAuth = true; // enable SMTP authentication $mail-&gt;Port = 25; // set the SMTP server port $mail-&gt;Host = "SMTP SERVER IP/DOMAIN"; // SMTP server $mail-&gt;Username = "EMAIL USER ACCOUNT"; // SMTP server username $mail-&gt;Password = "EMAIL USER PASSWORD"; // SMTP server password $mail-&gt;IsSendmail(); // tell the class to use Sendmail $mail-&gt;AddReplyTo("someone@something.com","SOMEONE"); $mail-&gt;From = "someone@something.com"; $mail-&gt;FromName = "SOMEONE"; $to = "other@something.com"; $mail-&gt;AddAddress($to); $mail-&gt;Subject = "First PHPMailer Message[Test Read Receipt]"; $mail-&gt;ConfirmReadingTo = "someone@something.com"; //this is the command to request for read receipt. The read receipt email will send to the email address. $mail-&gt;AltBody = "Please return read receipt to me."; // optional, comment out and test $mail-&gt;WordWrap = 80; // set word wrap $mail-&gt;MsgHTML($body); $mail-&gt;IsHTML(true); // send as HTML $mail-&gt;Send(); echo 'Message has been sent.'; } catch (phpmailerException $e) { echo $e-&gt;errorMessage(); } ?&gt; </code></pre> <p>Some modification need to be done in above script.</p> <ol> <li><p>Configure SMTP mail server.</p></li> <li><p>Set the correct FROM &amp; FROM Name (someone@something.com, SOMEONE)</p></li> <li><p>Set the correct TO address</p></li> </ol> <p><a href="http://www.how2guru.com/archives/php-send-email-request-read-receipt/" rel="nofollow noreferrer">from</a> </p> <p>also </p> <ol> <li><a href="https://stackoverflow.com/questions/1078251/delivery-reports-and-read-receipts-in-php-mail">Delivery reports and read receipts in PHP mail</a></li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload