Re: mail( ) : How to set the From header.

From: Date: Wed, 28 Jun 2000 01:53:25 +0000
Subject: Re: mail( ) : How to set the From header.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-3490@lists.php.net to get a copy of this message
On 27 Jun, Bob Treumann 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 :( > > ================================================= > Eww - I thought Pegasus was better behaved than that; this message was all over the place, linebreak-wise. In answer to your question, I think your problem may be related to your use of the single quote (') to enclose your additional headers. PHP normally doens't parse anything in '' so your \r\n will go through as is. Try substituting " for ' and see what happens. Cheers -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#3490) next »