Re: mail( ) : How to set the From header.
| From: | Manuel Lemos | Date: | Mon, 03 Jul 2000 16:24:36 +0000 |
| Subject: | Re: mail( ) : How to set the From header. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-4557@lists.php.net to get a copy of this message | ||
Hello Bob,
On 27-Jun-00 21:44:20, you wrote:
>This works fine but the "From" address shows: From:
>root@scout.phpwebhosting.com:
> mail($email,"Your Pure Harvest Password",'Password = bozo' )
> ||lf_exception ("Problem with email");
>================================================ So, I try to add a "From"
>header, thusly: and it does not send email, or report an error
> mail($email,"Your Pure Harvest Password",'Password = bozo' ,
> 'From: webserver@dbserve.net\r\nReply-
>to:bobt@elmwood.com') ||lf_exception ("Problem with email");
>=================================================
> Does anyone see a problem with my syntax? Could this be a configuration
> problem at the web host (phpwebhosting.com)? I
>have asked them the same question, but they are very poor at replying to
>support questions .. two weeks and counting :(
>=================================================
The From header (notice no colon) is different from the From: header. You
need to be able to set the message return path when sending the message.
Currently under Unix you can't do that with PHP mail() function you
need to use the sendmail program or communicate with the SMTP server
directly. You may want to try these PHP classes that let you do that:
http://phpclasses.UpperDesign.com/browse.html/package/9
http://phpclasses.UpperDesign.com/browse.html/package/14
Regards,
Manuel Lemos
Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
--
E-mail: mlemos@acm.org
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--