mail -f option for removing nobody@localhost Return-Path
| From: | Glenn Gasner | Date: | Wed, 19 Nov 2003 22:09:23 +0000 |
| Subject: | mail -f option for removing nobody@localhost Return-Path | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-170351@lists.php.net to get a copy of this message | ||
Here is the code I'm using trying to replace nobody@localhost with my email
address when I use the PHP mail() function to send a message:
$headers="From: Glenn Gasner <glenn@perex.com>\r\n"
."Reply-To: Glenn Gasner <glenn@perex.com>\r\n"
."Return-Path: Glenn Gasner <glenn@perex.com>";
mail("glenn@perex.com","Website Comment",$comments,$headers,"-f
glenn@perex.com");
With all of that the Return-Path is always still nobody@localhost, or in my
case:
Return-Path: nobody@host46.hrwebservices.net
which is the shared server I'm on which doesn't return bounced messages to
me. I've tried every variation of spaces, parenthesis and variables that I
can think of and I can't get the return path to budge. I included my mail()
command in an 'if' statement and it came out as "true," so my understanding
is that means my host isn't running in "safe mode" which might deactivate
the -f option. Some posts alluded to an apache permission needing to be
set, but there were no details and the Apache site didn't easily show what
permission I need to request changed so that I can modify the Return-Path in
outgoing email.
Is there something I'm overlooking, or something I should change, or
should I just abandon the mail() command altogether and try to use one of
the more cryptic variations mentioned in some posts (someone refered to
'popen' for mailing).
Thanks!
Glenn Gasner
glenn@perex.com