NYCPHP Meetup

NYPHP.org

[nycphp-talk] bounced email and Mail::send()

Anirudh Zala arzala at gmail.com
Fri Oct 14 23:53:24 EDT 2005


You already have paramater "Return-path" in your header so it should 
work. Do you use proper syntex in writing your all headers? Moreover try 
to add 1 more parameter "Errors-To" to your header string and then check 
whether it works or not. I have not tested it, but normally it works.

Thanks

Zala

---------------------------------
Anirudh Zala (Production Manager)
Ph: +91 281 245 1894
anirudh at aspl.in
http://www.aspl.in
---------------------------------



Allen Shaw wrote:

>Hi All,
>
>I would expect mail sent to bad addresses to bounce, but maybe I'm 
>missing something.  The following code snippet does send mail to good 
>addresses, but mail to bad addresses don't seem to bounce back to me.  I 
>suppose I'm missing some header, but I don't know what it would be.  Any 
>ideas?
>
><?php
>        include_once('Mail.php');
>        include_once('Mail/mime.php');
>
>        $hdrs = array(
>                      'From'    => 'me at mydomain.com',
>                      'Subject' => 'email subject',
>                      'Return-Path' => 'me at mydomain.com',
>                      'Reply-To' => 'me at mydomain.com',
>                      'Return-Receipt-To' => 'me at mydomain.com'
>                      );
>        $mime = new Mail_mime("\n");
>        $mime->setTXTBody("sample text");
>        $mime->addAttachment('/tmp/sample.pdf', 'application/pdf');
>
>        $body = $mime->get();
>        $hdrs = $mime->headers($hdrs);
>
>        $mail =& Mail::factory('mail');
>        $mail->send('nonExistentUser at mydomain.com', $hdrs, $body);
>?>
>
>BTW, I checked, and the mail is not falling into a failover or other 
>black hole that I know of.  For example sending to 
>"nonExistentUser at mydomain.com" from my desktop mail client gets me a 
>bounce within a few minutes.  Any thoughts?
>
>- Allen
>
>  
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20051015/ee211252/attachment.html>


More information about the talk mailing list