This is a discussion on Re: [PHP] Mail From option in PHP.ini within the PHP General forums, part of the PHP Programming Forums category; > Ok, I want to specify who the mail is coming from by using the sendmail_path > option in the ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
> 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. Why not just put it in the extra headers? $headers .= "From: $email_address_from_your_database\r\n"; Or you could possibly use ini_set() to change the php.ini setting. ---John Holmes... |
|
|||
|
.... and how about this?
$headers .= "Return-Path: $email_address_from_your_database\r\n"; tell me, if it works. ciao SVEN Brian S. Drexler wrote: > I tried the extra header. The problem is with the return receipts. > The mail is being generated by a server other than my main e-mail > server, so if I want a delivery/read receipt I have to specify a > "From" e-mail address or else it will default to the user executing > the script, i.e. uucp@my.server.com ini_set() does not appear to > work with sendmail_path. sendmail_path is in the PHP_INI_SYSTEM group > so it can only be set in the php.ini or httpd.conf...Thanks for the > suggestion though... > > -----Original Message----- > From: CPT John W. Holmes [mailto:holmes072000@charter.net] > Sent: Friday, July 18, 2003 11:09 AM > To: sysadmin@saginawcontrol.com; php-general@lists.php.net > Subject: Re: [php] Mail From option in PHP.ini > > >> 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. > > Why not just put it in the extra headers? > > $headers .= "From: $email_address_from_your_database\r\n"; > > Or you could possibly use ini_set() to change the php.ini setting. > > ---John Holmes... |
|
|||
|
No, I tried this too. Here is what I've tried....
$hdrs = array( 'From' => '"'.$FullName.'" <'.$Email.'>', 'Return-Path' => $Email, //'From' => $Email, //'Disposition-Notification-To' => '"'.$FullName.'" <'.$Email.'>', 'Disposition-Notification-To' => $Email, 'Return-Receipt-To' => '"' .$FullName.'" <'.$Email.'>', //'Return-Path' => $Email, 'Subject' => 'Your Quote # '.$Theresult ); The commented out ones were also tried.... -----Original Message----- From: sven [mailto:svenie@gmx.li] Sent: Friday, July 18, 2003 11:23 AM To: php-general@lists.php.net Subject: Re: [php] Mail From option in PHP.ini .... and how about this? $headers .= "Return-Path: $email_address_from_your_database\r\n"; tell me, if it works. ciao SVEN Brian S. Drexler wrote: > I tried the extra header. The problem is with the return receipts. > The mail is being generated by a server other than my main e-mail > server, so if I want a delivery/read receipt I have to specify a > "From" e-mail address or else it will default to the user executing > the script, i.e. uucp@my.server.com ini_set() does not appear to > work with sendmail_path. sendmail_path is in the PHP_INI_SYSTEM group > so it can only be set in the php.ini or httpd.conf...Thanks for the > suggestion though... > > -----Original Message----- > From: CPT John W. Holmes [mailto:holmes072000@charter.net] > Sent: Friday, July 18, 2003 11:09 AM > To: sysadmin@saginawcontrol.com; php-general@lists.php.net > Subject: Re: [php] Mail From option in PHP.ini > > >> 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. > > Why not just put it in the extra headers? > > $headers .= "From: $email_address_from_your_database\r\n"; > > Or you could possibly use ini_set() to change the php.ini setting. > > ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |