[nycphp-talk] bounced email and Mail::send()
Anirudh Zala
arzala at gmail.com
Tue Oct 18 00:07:06 EDT 2005
This "-f " switch has 2 drawback as well. Sometimes web based email
treats it as span because, you forcibly mention different Return-path
than it should be. Check all headers of your mail. You may find 1 header
in your mail like "X-Authentication-Warning: SERVER NAME: apache set
sender to bounce at SOMETHING.SOME using -f"
So you should use authenticated user account like root, admin etc. so
above header will not added with your messages. Please note that you can
not set return path using headers. so header "Return-path" will not
yield anything.
Thanks,
---------------------------------
Anirudh Zala (Production Manager)
Ph: +91 281 245 1894
anirudh at gmail.com
http://www.aspl.in
---------------------------------
Allen Shaw wrote:
>Now *this* works. I didn't realize that the Mail::factory() docs
>mentioned a $backend argument, and even those docs wouldn't have lead me
>to believe I'd get better results by changing it, but just switching to
>'smtp' instead of 'mail' seems to have solved the problem entirely.
>Good call.
>
>Thanks,
>Allen
>
>Kenneth Downs wrote:
>
>
>>I went nuts with this until I gave up on shell emails and used TCP. The
>>TCP option requires you to have your email server running, but on the
>>other hand, the shell method made it impossible to get the Return path
>>right, and that was a deal-breaker. Using the PEAR package the code is
>>this:
>>
>>// Assume an array $em() that has some stuff in it
>>include_once('Mail.php');
>>$recipients =$em["email_to"];
>>$headers['From'] = $from_name. "<".$from_addr.">";
>>$headers['To'] = $em["email_to"];
>>$headers['Subject'] = $em["email_subject"];
>>$headers['Date'] = date("D, j M Y H:i:s O",time());
>>$body = $em["email_message"];
>>$mail_object = Mail::factory('smtp', $params);
>>$mail_object->send($recipients, $headers, $body);
>>
>>Once I got this running I've never looked back.
>>
>>
>>
>>
>>>Thanks, Anirudh. I'll look into this some more. To pass the -f flag to
>>>the PHP mail() function might work, but also I am trying to do this with
>>>PEAR Mail::send(), so I will dig deeper into that codebase to look for
>>>clues.
>>>
>>>Still mystified,
>>>Allen
>>>
>>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20051018/ef2ea5cd/attachment.html>
More information about the talk
mailing list