Re: [PHP] Line breaks again....
On Thursday 22 July 2004 13:13, Justin Patrin wrote: > AHA! Outlook, by default, removes "extra" line breaks in text > messages. Do you see a message which says this in Outlook? This is an > option you can turn off. If this doesn't work, just send the message > as HTML. There's really no reason not to, especially if you're in > Outlook. Haven't used OUtlook for years - viewing the message source (Alt-ENTER ?) will show the message verbatim, with all newlines etc wouldn't it? -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* I have found little that is good about human beings. In my experience most of them are trash. -- Sigmund Freud */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Line breaks again....
On Wed, 21 Jul 2004 23:42:04 -0400, PHP User <[EMAIL PROTECTED]> wrote: > I am using Outlook 2003 in text mode to view messages (which is what I > want). AHA! Outlook, by default, removes "extra" line breaks in text messages. Do you see a message which says this in Outlook? This is an option you can turn off. If this doesn't work, just send the message as HTML. There's really no reason not to, especially if you're in Outlook. > This is the relevent code... > > Code for input from form . > > $text=str_replace("\n","\r\n",$text); I've used the following to fix newlines: $text=str_replace("\r\n","\n",$text); $text=str_replace("\r","\n",$text); $text=str_replace("\n","\r\n",$text); > * this replaces \n before the email is sent. Not sure this is necessary or > right, but nothing else I have tried works either * > > if($mail->Send()) * email gets sent > { > > $text=str_replace("\n","",$text); > $text=str_replace("","",$text); > * these two lines make it display properly on my site * > > ..... Code to display message > > Thanks > > > > -Original Message- > From: John W. Holmes [mailto:[EMAIL PROTECTED] > Sent: July 21, 2004 6:36 PM > To: PHP User > Cc: PHP > Subject: Re: [PHP] Line breaks again > > PHP User wrote: > > > I have managed to get the line breaks to show up on my site no problem, > but > > I still get one long line when it is sent to my email. I have looked and > > looked and have read all the stuff I could find on \r\n, so I'm not sure > > where to go from here since it's not working... > > Are you viewing HTML email or plain text? Using \r\n or \n will work > fine in most email viewers. Are you sure you're not stripping the \n > from the text to show it with in HTML and then screwing up the > presentation in email? Hard to tell what you're doing without any > code... hint hint... > -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Line breaks again....
I am using Outlook 2003 in text mode to view messages (which is what I want). This is the relevent code... Code for input from form . $text=str_replace("\n","\r\n",$text); * this replaces \n before the email is sent. Not sure this is necessary or right, but nothing else I have tried works either * if($mail->Send()) * email gets sent { $text=str_replace("\n","",$text); $text=str_replace("","",$text); * these two lines make it display properly on my site * . Code to display message Thanks -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED] Sent: July 21, 2004 6:36 PM To: PHP User Cc: PHP Subject: Re: [PHP] Line breaks again PHP User wrote: > I have managed to get the line breaks to show up on my site no problem, but > I still get one long line when it is sent to my email. I have looked and > looked and have read all the stuff I could find on \r\n, so I'm not sure > where to go from here since it's not working... Are you viewing HTML email or plain text? Using \r\n or \n will work fine in most email viewers. Are you sure you're not stripping the \n from the text to show it with in HTML and then screwing up the presentation in email? Hard to tell what you're doing without any code... hint hint... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals - www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Line breaks again....
PHP User wrote: I have managed to get the line breaks to show up on my site no problem, but I still get one long line when it is sent to my email. I have looked and looked and have read all the stuff I could find on \r\n, so I'm not sure where to go from here since it's not working... Are you viewing HTML email or plain text? Using \r\n or \n will work fine in most email viewers. Are you sure you're not stripping the \n from the text to show it with in HTML and then screwing up the presentation in email? Hard to tell what you're doing without any code... hint hint... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php