From: Don S. <do...@se...> - 2003-02-19 17:03:01
|
OK I'll try that. Perhaps we could do with a core "mail" function that takes in the to, from, and message params? I'm sure there are a couple of mods that might send emails. Like my next work, phpwsSendPr0nSpam. Don. On Wed, 19 Feb 2003, Steven Levin wrote: > 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 > > > |