From: Don S. <do...@se...> - 2003-02-19 16:33:22
|
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. |
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... |
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 > > > |
From: Steven L. <st...@tu...> - 2003-02-19 17:07:34
|
Hey Don, We think the Pear mailing package is great and have been using that. It is quite easty to use. You should check it out. Steven > 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 >> >> >> > > > ------------------------------------------------------- > 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... |
From: Don S. <do...@se...> - 2003-02-19 17:11:04
|
Pear, eh. I'll look into that then. Is there a module using it now that I could scam some code from? Changing the order of the headers (From is first) had no change. Thanks. Don. On Wed, 19 Feb 2003, Steven Levin wrote: > Hey Don, > > We think the Pear mailing package is great and have been using that. It > is quite easty to use. You should check it out. > > Steven > > > 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 > >> > >> > >> > > > > > > ------------------------------------------------------- > > 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 > > > |
From: Don S. <do...@se...> - 2003-02-19 17:16:03
|
Eh perhaps I should actually go to the website and see the parts marked "Example" before I appear like such a lazy bastard. Don. On Wed, 19 Feb 2003, Don Seiler wrote: > Pear, eh. I'll look into that then. Is there a module using it now that > I could scam some code from? > > Changing the order of the headers (From is first) had no change. > > Thanks. > > Don. > > On Wed, 19 Feb 2003, Steven Levin wrote: > > > Hey Don, > > > > We think the Pear mailing package is great and have been using that. It > > is quite easty to use. You should check it out. > > > > Steven > > > > > 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 > > >> > > >> > > >> > > > > > > > > > ------------------------------------------------------- > > > 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 > > > > > > > > > ------------------------------------------------------- > 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 > > > |
From: Steven L. <st...@tu...> - 2003-02-19 17:20:56
|
No sorry Don no module implementation, we used it on a php shell script we use on campus. ie. our own pr0n spammer :) Here is what we went by: http://pear.php.net/manual/en/core.mail.mail.php Our code is not too different from the example at the bottom. Hope this helps, Steven > Pear, eh. I'll look into that then. Is there a module using it now > that I could scam some code from? > > Changing the order of the headers (From is first) had no change. > > Thanks. > > Don. > > On Wed, 19 Feb 2003, Steven Levin wrote: > >> Hey Don, >> >> We think the Pear mailing package is great and have been using that. >> It >> is quite easty to use. You should check it out. >> >> Steven >> >> > 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 >> >> >> >> >> >> >> > >> > >> > ------------------------------------------------------- >> > 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 >> >> >> > > > ------------------------------------------------------- > 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... |