ajarantes Posted September 30, 2008 Share Posted September 30, 2008 The e-mail I'm sending insists in not recognize the line-feed/carriage-return "\n\r". I send it to Gmail, Yahoo, Hotmail and the text always arrive as one single paragraph. The "\n\r" don't show up but also don't create new lines or paragraphs. Only when I send to one of my own e-mail addresses and open with "squirrelMail" is that it opens correctly. But when I download the same e-mail to my computer and open with Thunderbird, it goes back to one only paragraph. Do you have any idea what else I can try? Thanks. Here is the code: $to = $mail; $subject = $subj; $message = "Dear $name,\r\r\n\n" . "This e-mail was sent to you to confirm your registration with KIMIMI.\r\r\n\n" . "You have 24 hours to proceed with this confirmation or your registration will be lost." . "To finalize the process and start using all the wonderful features of KIMIMI, " . "clik on the link below or, if you do not allow HTML in the e-mails " . "you receive, copy and paste the link to your browser address area \r\r\n\n" . "http://www.kimimi.net/confreg.php?id=$confstring\r\r\n\n" . "If you have any problems, please contact us.\r\r\n\n" . "Welcome to KIMIMI\r\nThe Kimimi Team\r\nwww.kimimi.net"; $headers = "From: [email protected]\r\n" ; $headers .= "To: $email <".$email.">\r\n" ; $headers .= "Reply-To: [email protected]\r\n" ; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "MIME-Version: 1.0\r\n"; $headers .= "X-Mailer: PHP/" . phpversion() . "\r\n"; $mail = mail($to, $subject, $message, $headers); Link to comment https://forums.phpfreaks.com/topic/126487-solved-carriage-return-problem-inside-a-email-message/ Share on other sites More sharing options...
discomatt Posted September 30, 2008 Share Posted September 30, 2008 That's cause it's like this Win - \r\n *nix/OS X - \n OS 9 - \r Link to comment https://forums.phpfreaks.com/topic/126487-solved-carriage-return-problem-inside-a-email-message/#findComment-654046 Share on other sites More sharing options...
discomatt Posted September 30, 2008 Share Posted September 30, 2008 Also, you're sending HTML - which wants <br /> for line breaks. Change your content type to Content-type: text/plain; charset=iso-8859-1 Link to comment https://forums.phpfreaks.com/topic/126487-solved-carriage-return-problem-inside-a-email-message/#findComment-654051 Share on other sites More sharing options...
ajarantes Posted September 30, 2008 Author Share Posted September 30, 2008 You were perfect! the problem was the Content-type. Once I put text/plain, problem was solved. Thank you very much!!!! Link to comment https://forums.phpfreaks.com/topic/126487-solved-carriage-return-problem-inside-a-email-message/#findComment-654169 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.