Open fans3210 opened 7 years ago
I had the same problem and was looking for an answer
I tried to fix this problem by modifying the code in the "mailcore2/src/core/rfc822/MCMessageBuilder.cpp " file, as shown below. I changed "disposition" to "NULL" .
As shown below. I sent an email with only one normal attachment, but as I checked the source of the email, I found there are two extra multi parts with content-deposition of 'inline'. Which confuses my friend's email app which was written using javamail. He always thought I sent him an email with inline attachments while I wasn't.
Is this a normal behavior? How to avoid sending such extra things?
_____sample____
Message-ID: 089f27a2-d82e-4fda-a648-e08246cd7faf@YAO-DONG-LIs-iPhone Subject: Qq MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="5847ea52_46e87ccd_be1d"
--5847ea52_46e87ccd_be1d Content-Type: multipart/alternative; boundary="5847ea52_238e1f29_be1d"
--5847ea52_238e1f29_be1d Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline
Q --5847ea52_238e1f29_be1d Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Q --5847ea52_238e1f29_be1d--
--5847ea52_46e87ccd_be1d Content-Type: image/jpeg Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="53B6C757-20DA-45E9-AF09-2580DE78F4A3.jpg"