jcavard Posted February 24, 2006 Share Posted February 24, 2006 Hi! I use PHPMailer to send mail. I use \n as line carriage (new line) on a PC it works great but on a MAC it seems like \n doesnt work... it print all the text on the same line... Link to comment https://forums.phpfreaks.com/topic/3572-problem-with-new-line-n-in-plain-text-email-on-mac/ Share on other sites More sharing options...
obsidian Posted February 24, 2006 Share Posted February 24, 2006 [!--quoteo(post=349095:date=Feb 24 2006, 01:32 PM:name=jcavard)--][div class=\'quotetop\']QUOTE(jcavard @ Feb 24 2006, 01:32 PM) [snapback]349095[/snapback][/div][div class=\'quotemain\'][!--quotec--]Hi! I use PHPMailer to send mail. I use \n as line carriage (new line) on a PC it works great but on a MAC it seems like \n doesnt work... it print all the text on the same line...[/quote]try using "\r\n" instead. typically, it's windows machines that need the \r, but it's worth a shot. Link to comment https://forums.phpfreaks.com/topic/3572-problem-with-new-line-n-in-plain-text-email-on-mac/#findComment-12369 Share on other sites More sharing options...
jcavard Posted February 27, 2006 Author Share Posted February 27, 2006 anyone has ever encountered this before???? Link to comment https://forums.phpfreaks.com/topic/3572-problem-with-new-line-n-in-plain-text-email-on-mac/#findComment-12804 Share on other sites More sharing options...
Barand Posted February 27, 2006 Share Posted February 27, 2006 Newline codes::[code]Unix/linux \nMac \rWindows \r\n[/code] Link to comment https://forums.phpfreaks.com/topic/3572-problem-with-new-line-n-in-plain-text-email-on-mac/#findComment-12812 Share on other sites More sharing options...
neylitalo Posted February 27, 2006 Share Posted February 27, 2006 This is probably because of the different types of line breaks on the different OSes.Here's how the line breaks work inUnix: \nMac: \rWindows: \n\rUse \n\r to be safe :) [b]edit: [/b]Barand's too quick ;) Link to comment https://forums.phpfreaks.com/topic/3572-problem-with-new-line-n-in-plain-text-email-on-mac/#findComment-12813 Share on other sites More sharing options...
jcavard Posted February 27, 2006 Author Share Posted February 27, 2006 thank you! Link to comment https://forums.phpfreaks.com/topic/3572-problem-with-new-line-n-in-plain-text-email-on-mac/#findComment-12828 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.