Re: Mail From option in PHP.ini

From: Date: Sun, 20 Jul 2003 19:33:48 +0000
Subject: Re: Mail From option in PHP.ini
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-155992@lists.php.net to get a copy of this message
* Thus wrote Lowell Allen (la@lowellallen.com): > return-path for emails is something like "Return-Path: > <user@servername.hostcompany.com>". I had accepted that I could not change > the return-path value with PHP, but reading about this fifth parameter > renewed my hope that I could. > > I tried adding a fifth parameter to mail() in order to do this, like so: > > // fifth mail() parameter to set envelope sender > $cmd_line_param = "-falert@my_domain.com"; > mail("$fullname<$email>", $subject, $message, $headers, $cmd_line_param); > > This didn't change the return-path header. Perhaps the problem is that I > have no idea what the syntax of the command line parameter is (what the "-f" > does). I believe its '-f email@domain.tld', could be different depending on wich sendmail your using. I'm curious though what if your sendmail already has a -f on it: php.ini: sendmail_path=sendmail -femail@domain.tld thus a command sendmail -fsystem@domain.tld -fuser@domain.tld > > Can anyone advise? Is it possible to use this fifth parameter to set the > return-path header, and if so, what's the syntax? > Also, the 5th paramater is disabled in safe_mode, check that also if the above doesn't work. Curt -- "I used to think I was indecisive, but now I'm not so sure."

« previous php.general (#155992) next »