note 41639 deleted from function.mail by aidan
| From: | aidan@php.net | Date: | Mon, 14 Feb 2005 02:20:28 +0000 |
| Subject: | note 41639 deleted from function.mail by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-84961@lists.php.net to get a copy of this message | ||
Note Submitter: Greg
----
The \r\n or \n issue...
I'd been pulling my hair out over this one for months. The problem I had was mail sent with
mail() was being delivered fine to my account, but other users (with accounts on an MS Exchange
server) saw the attachment text in the message body - however when I used Outlook to view my
(non-Exchange) IMAP folder they loaded fine.
Because \r\n seemed like the 'right thing to do', based on the comments about the RFC etc
the last thing I tried in order to fix the problem was replace them with \n... However that's
exactly what fixed it.
I don't know how the RFC explains this one, but when I did change all the \r\n's to \n it
worked perfectly (and when I got a chance to look at an outlook user's broken emails,
everything was infact doubly spaced, i.e. \r\n was converted to \n\n somewhere along the line).
So I suggest if \r\n isn't working for you, just try \n. It might not be correct by the RFC,
but 90% of my users not being able to read the attachments wasn't a better option...
Hope this helps anyone who's got the same problem.