Does anyone know how to make Outlook disaply line breaks in a email, when sent from a textarea in php?
At the moment, it disaplys no line breaks at all, but Outlook express does.
Peter
| SitePoint Sponsor |





Does anyone know how to make Outlook disaply line breaks in a email, when sent from a textarea in php?
At the moment, it disaplys no line breaks at all, but Outlook express does.
Peter

Here is an article I found on the net at http://www.windowsitlibrary.com/Content/238/22/2.html#7. I'm not sure if this is the answer you are looking for, but I hope this helps...
Forcing Line Breaks
An Internet e-mail annoyance you’re likely to run into is the fact that some e-mail programs (such as Digital’s All-in-One or Netscape Navigator 2.0) do not automatically wrap lines to fit the display. Recipients may complain that they have to scroll far to the right to see all your paragraphs.
Microsoft Exchange Server can be set to force default line lengths to help overcome some of these problems. This adjustment must be made by the Exchange Server administrator and affects all messages and users.
However, the Internet Mail service does not offer any way to automatically break lines with a hard return at a certain length. Instead, you need to consider one of the following workarounds:
Break lines yourself by pressing Enter where you want the break to occur.
Use WordMail as your e-mail editor and a macro that inserts hard returns for you. An example of such a macro is included on the CD for this book.
Use MIME with USASCII for your message format. However, the recipient may see an = character at the end of each line where a soft return is detected; and this method may not work for all recipients.
Use UUENCODE with USASCII for the message format.
Joe Eliason
Just a dog learnin' PHP from cat.
When you want a simple line break such as
this
only addwhere you want the break.Code:\n
or isn't this your problem ?![]()





I found the answer. I gotta do this:
And strangely, even for plain text messages, the <br> is parsed and displays a line break.PHP Code:$text = str_replace("<br>", "\\n", $text);
Cool Huh
Peter
You've forgot something:
better now?Code:$text = str_replace("<br>", "\n", $text);





yup
Thanx
Peter
Bookmarks