From: Steven L. <st...@tu...> - 2003-02-19 16:43:15
|
Don, I have used that function before and got it to work just fine. The only difference I see in my code is that I put the 'From' as the very first thing in the header. Maybe try that, but it would be silly if that was the issue. Steven > I'm at my wits' end. No matter how many headers I set and pass to the > mail() function, the email always arrives with "apache" as the sending > user. Granted the "Reply-To" is set properly and all other stuff is > right. But I'd like to mail to appear as From the desired sender. > > I've read the user comments on the php mail() doc page and have tried > nearly everything suggested, to no avail. > > Here is what I'm doing regards to trying to set the From address: > > $from = "\"" . $_REQUEST["EMAIL_sender_name"] . "\" <" . > $_REQUEST["EMAIL_sender_email"] . ">"; > $headers = "MIME-Version: 1.0\n"; > $headers .= "Content-type: text/plain; charset=iso-8859-1\n"; > $headers .= "X-Sender: <". $_REQUEST["EMAIL_sender_email"] . > ">\n"; > $headers .= "X-Mailer: PHP\n"; //mailer > $headers .= "X-Priority: 1\n"; //1 UrgentMessage, 3 Normal > $headers .= "X-MSMail-Priority: High\n"; //1 UrgentMessage, 3 > Normal > $headers .= "From: $from\n"; > $headers .= "Reply-To: <". $_REQUEST["EMAIL_sender_email"] . > ">\n"; > $headers .= "Return-Path: <". $_REQUEST["EMAIL_sender_email"] . > ">\n"; > $extra = "-f " . $_REQUEST["EMAIL_sender_email"]; > > so I call mail($to, $subject, $message, $headers, $extra). mail is sent > fine, but that From: field gets changed to apache. > > Has anyone dealt with this jazz? > > Don. > > > ------------------------------------------------------- > This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The > most comprehensive and flexible code editor you can use. > Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. > www.slickedit.com/sourceforge > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers -- Steven Levin Electronic Student Services Appalachian State University Phone: 828.262.2431 PhpWebsite Development Team URL: http://phpwebsite.appstate.edu Email: st...@NO... |