How to set sending e-mail address?
| From: | Anders Norrbring | Date: | Thu, 04 Sep 2008 05:53:23 +0000 |
| Subject: | How to set sending e-mail address? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-279477@lists.php.net to get a copy of this message | ||
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@web.domain.tld' 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@domain.tld' ); Oh, the mail sent doesn't use the Return-Path I set, it's still set as wwwrun@web.domain.tld. What else can I do, and what have I missed? Anders