Re: Mail From option in PHP.ini
| From: | Manuel Lemos | Date: | Sat, 19 Jul 2003 02:19:02 +0000 |
| Subject: | Re: Mail From option in PHP.ini | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-155865@lists.php.net to get a copy of this message | ||
Hello,
On 07/18/2003 12:00 PM, Brian S. Drexler wrote:
Ok, I want to specify who the mail is coming from by using the sendmail_path option in the PHP.ini. I've added the -fme@mydomain.com to it, but I want to be able to dynmaically change me@mydomain.com to you@mydomain.com or whatever else. Anyone have any ideas how I can do this? I'm pulling the e-mail I'd like to change it to from a MySQL database but can I rewrite the php.ini file on the fly or am I stuck. Any help is greatly appreciated.You can try the mail() function 5th parameter if you are under Unix/Linux not in safe mode. Alternatively you may want to try this class that emulates the envelope sender address using the Return-Path: path header. It comes with different subclasses that implement different mail delivery methods. Each support setting the return-path address in a specific way. http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/