multipart-alternative

Receiving mail server inserts space before each new line, breaking multipart/alternative

牧云@^-^@ 提交于 2020-01-06 14:56:54
问题 I am using PHP to send emails on demand to clients. I have a script which seemed fairly robust in testing, generating MIME-1.0 Compatible multipart/alternative emails that had a text and html version. Emails are sent as base64 encoded strings to preserve international characters (message text is usually in German). However, it seems that certain servers, upon receiving the mail, insert a space ( 0x20 ) just before each CR-LF sequence. This doesn't break the base64, of course, but since it

Gmail API replaces text/plain alternative body part with automatically generated one from HTML

a 夏天 提交于 2019-12-13 06:44:41
问题 I'm sending emails from Android devices using the Gmail API with an alternative text/plain version. The email is structured as follows: multipart/mixed multipart/alternative text/plain text/html attachment Everything works great, except for the text/plain part, which is being replaced by a sanitized version extracted from the text/html part. If I try sending to the same address as the sender (from email X to email X), both the original text/plain and text/html versions are maintained. If I