Note that there are some explanatory texts on larger screens.

plurals
  1. POPEAR::Mail with DSN SMTP service
    primarykey
    data
    text
    <p>Do you know if it is posible to set a DSN communication using the Pear Mail function in PHP?</p> <p>Explain: If a write this code in a telnet session:</p> <pre><code>telnet smtp.example.com 25 [...] mail from: me@example.com 250 2.1.0 Ok rcpt to: you@fakemail.com NOTIFY=SUCCESS,FAILURE,DELAY ORCPT=rfc822;you@fakemail.com 250 2.1.5 Ok [] </code></pre> <p>i received a notification mail with a status code from the receiver smtp server (relayed, failed, etc.) when my smpt server sends the email. Now i want to do the same using Pear Mail, but I can't find where i have tu put this option.</p> <p>This is my code:</p> <pre><code>$messageTEXT= "..." // text_message $messageHTML="..." // html message $headers=array(); $headers['From'] = "me@example.com"; $headers['To'] = "you@fakemail.com"; $headers['Subject'] = "Test mail"; $headers['X-Mailer']="My PHP mailer"; $headers['X-Priority']=3; $headers['Errors-To'] = "me@example.com"; $headers['Return-Path'] = "me@example.com"; $headers['Disposition-Notification-To'] = "me@example.com"; $message = new Mail_mime(); $message-&gt;setTXTBody($messageTEXT); $message-&gt;setHTMLBody($messageHTML); $mimeparams=array(); $mimeparams['charset']= "UTF-8"; $mimeparams['text_encoding']="8bit"; $mimeparams['text_charset']="UTF-8"; $mimeparams['html_charset']="UTF-8"; $body = $message-&gt;get($mimeparams); $headers = $message-&gt;headers($headers); $smtp = Mail::factory( 'smtp', array( 'host' =&gt; "smtp.example.com", 'port' =&gt; "25", 'auth' =&gt; true, 'username' =&gt; "myuser", 'password' =&gt; "mypass") ); $mail=$smtp-&gt;send($to, $headers, $body); if (PEAR::isError($mail)) { print ("Error"); return false; } </code></pre> <p><a href="http://pear.php.net/manual/en/package.mail.mail.php" rel="nofollow">http://pear.php.net/manual/en/package.mail.mail.php</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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