Search code examples
phpmail-mime

Known problems with Mail_mime that cause empty lines at some e-mail providers?


I'm sending a PDF and a short text message with Mail_mime 1.8.8 (+ Mail 1.2.0). Almost every test is without a problem. Including GMail and Apple iCloud.

But it seems some recipients have trouble reading the attachment. Users of United Internet (1&1 and GMX) get empty lines between all the lines in the body.

As it's a multipart/mixed e-mail with headers in the body, the attachment is broken.

Is there a known problem with the e-mails generated with Mail_mime that could cause that? Regardless if the e-mail provider is using software that ignores the principles of Jon Postel to be tolerant with the data it receives?


Solution

  • PEAR packages Mail and Mail_mime don't work together without tweaking the parameters to Mail_mime: http://pear.php.net/manual/en/package.mail.mail-mime.mail-mime.php

    You need to set EOL to a single linefeed.