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","<br>",$text); 
$text=str_replace("<br />","",$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 <br> 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

Reply via email to