mail(): "\r\n" gives extra empty line between each line in Outlook
| From: | Eelco de Vries | Date: | Fri, 23 Mar 2001 05:57:48 +0000 |
| Subject: | mail(): "\r\n" gives extra empty line between each line in Outlook | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-45250@lists.php.net to get a copy of this message | ||
Hi all,
First I had a problem that text from a textarea form object passed to mail()
ended up as a single line of text in MS Outlook.
I changed the newlines to newlines _with_ carriage returns:
strtr($mailbody, "\n", "\r\n");
Now it's not a single line of text but every newline skips an extra line
?!?!
The following is typed in the textarea en passed to mail():
"line 1
line 2
line 3"
In Outlook it shows as:
"line 1
line 2
line 3"
The "\n" alone gives a single line of text, the "\r\n" gives an extra empty
line between each line. (the "\r" alone ends up the same as "\r\n").
What is going on here?
How can I fix this?
Regards;
Eelco.