dissectsound Posted May 28, 2008 Share Posted May 28, 2008 I am having problems with a mail script I wrote. When I use the script to send to a cellphone I get it from ftpusername@hostname. I would like it to come from a email address that is setup on the server. When I send to an email address setup in outlook express it shows that it is sent from [email protected] Here is my code... <HTML> <HEAD> <TITLE>php mail to verizon wireless</TITLE> </HEAD> <BODY> <?php $eol="\r\n"; $to = "##########@vtext.com"; $subject = "testing"; $message= "testing message"; $headers = "From: [email protected]\r\n"; $headers .= "Reply-To: [email protected]\r\n"; $headers .= "Return-Path: [email protected]\r\n"; echo "$headers"; mail($to, $subject, $message, $headers); ?> </BODY> </HTML> Any help would be greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/107581-php-mail-form-to-cellphone/ Share on other sites More sharing options...
corbin Posted May 28, 2008 Share Posted May 28, 2008 The all capital title wasn't really necessary. Anyway, I've heard of weird problems caused between \r\n and \n.... Try just \n and see if it works correctly ;p (might be something else, but everything seems good). Link to comment https://forums.phpfreaks.com/topic/107581-php-mail-form-to-cellphone/#findComment-551434 Share on other sites More sharing options...
dissectsound Posted May 28, 2008 Author Share Posted May 28, 2008 Sorry about the caps. Yea I tried it with just \n. That didn't work either. Here is my updated code... <HTML> <HEAD> <TITLE>New Document</TITLE> </HEAD> <BODY> <?php $to = "##########@vtext.com"; $subject = "testing"; $message = "hello"; $headers = "From: [email protected]\n"; $headers .= "Reply-To: [email protected]\n"; $headers .= "Return-Path: [email protected]\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\n"; echo "$headers"; mail($to, $subject, $message, $headers); ?> </BODY> </HTML> I tried adding some headers. still no luck, when sent to a cellphone it still shows the ftpusername@localhost as the person that sent the message. Im begining to think its not possible to send to a cellphone as whoever you want. Works fine to an outlook express address tho. Any other suggestions? I really appreciate the help. Link to comment https://forums.phpfreaks.com/topic/107581-php-mail-form-to-cellphone/#findComment-551771 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.