 <p>I had a similar issue. It was not really an issue with Gmail or with PHP. The issue, in my case, was that when PHP generated the email message from my PHP source file, like the one above, it interpreted the end of lines in some way that Gmail did not like, perhaps it sent a LF instead of CRLF, some thing like that. I did not look at the details. What I know is that, given that the default on my emails was CRLF for an end of line, I wrote explicitly all end of lines using <code>&lt;?php echo "\r\n"; ?&gt;</code>, instead of relying on empty lines in the file and then Gmail interpreted correctly the message. It is likely that the issue was specific to the editor I used to write the PHP source file. In my case it was Notepad++. Perhaps it was not configured properly. It does not matter, now, just to be on the safe side, I always explicitly enter the end of lines in my email messages, at the least for the part that must be understood by MTAs and MUAs, the Content-Type, the boundary, etc. </p>