Re: How to set sending e-mail address?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mike skrev:
Return-path is used by mail daemons, not usually shown in client emails

That's what From or Reply-to is for...

Return-path is valuable for capturing bounces and stuff. I always set
it to a bounce@ alias, and then the From: is always the friendly
"display" address.

I also use popen() to open a connection directly to my sendmail binary
(/usr/sbin/sendmail -t -f -i bounce@xxxxxxxxxxxxxxxxxxxxxxxxxxx) it
seems to act instantly where I've had some oddities with PHP's mail()
in the past.
Thanks Mike, but it didn't really help me out in this app...
This one is making use of PEAR Mail:Mime and Mail, and that seems to work really good, set aside that I can't alter the Return-Path. I really do want the return path to be different, just because of the bounce capture, there's a special address for those on the system where this thing runs.. Therefor I'd like to set it.

Anders


On Wed, Sep 3, 2008 at 10:53 PM, Anders Norrbring <lists@xxxxxxxxxxxx> wrote:
I'm trying to figure out how to set the sending address when sending e-mail
from PHP, but it doesn't seem like I'm having much success..

When I look in the mail queue, I always see 'wwwrun@xxxxxxxxxxxxxx' as the
origin (the web server user).

In my sending routine I set headers like this:
$hdrs = array(
'From'    => $MAILFROM,
'Subject' => iconv(strtoupper(CHARSET), "ISO-8859-1", $subject),
'Reply-To' => $MAILFROM,
'Date' => date("r"),
'Return-Path' => 'POSTMASTER@xxxxxxxxxx'
);

Oh, the mail sent doesn't use the Return-Path I set, it's still set as
wwwrun@xxxxxxxxxxxxxxx
What else can I do, and what have I missed?

Anders

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux