Emails with PDF attachments sent by Twitter don't show the attachment due to incorrect MIME structure where attachment sits in last part of multipart/alternative



a year ago
4 months ago


(Reporter: robbyke, Unassigned)


52 Branch
Windows 7

Firefox Tracking Flags

(Not tracked)



(1 attachment)



a year ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0
Build ID: 20170628075643

Steps to reproduce:

1. Login to a Twitter account.
2. Go to "Settings and privacy".
3. Go to "Your Twitter data"
4. Scroll down until you find a button called "Request advertiser list"
5. Press this button and confirm emailing the list.

Actual results:

Received an email which appears to have no list at first, not as attachment nor as inline text, but upon inspecting the source of the email, you can clearly see that there is supposed to be a PDF attached but Thunderbird is not showing it.

Expected results:

Thunderbird should show that there is a PDF attached.


a year ago
OS: Unspecified → Windows 7
Hardware: Unspecified → x86_64

Comment 1

a year ago
I cannot attach an .EML file as I do not know what personal data this may contain, but this issue should be easily reproducible by anyone with a Twitter account when you follow the steps.

Comment 2

a year ago
We need such an e-mail. You can edit the .eml file with a text editor and remove any personal data, for example, replace e-mail addresses with

Richard, you have a Twitter account, can you reproduce this?

I suspect that the MIME structure of the message will be wrong and that this therefore falls into the category of "make TB more tolerant to messages with bad MIME structure", most likely a duplicate of bug 1367973 or bug 1362539.
Flags: needinfo?(richard.marti)
Created attachment 8892838 [details]
Your advertiser list is ready.eml

This is such an email. The attachment is only shown when I choose View/Message Body As/All Body Parts.
Flags: needinfo?(richard.marti)

Comment 4

a year ago
Richard, you deleted the "attachment", right, the part is empty:

Content-Type: application/pdf; name=twitter_advertiser_list.pdf
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=twitter_advertiser_list.pdf


In any case, it's an incorrect MIME structure, all all parts belong to multipart/alternative where the attachment sits in the last (undisplayed) part. Of course the overall structure for a message with attachment(s) should be multipart/mixed.

As predicted, a dupe of bug 1367973. Twitter should know better not to send invalid messages like this one. Maybe complain to Twitter, it's a free product/service, let's see whether their service is equally good.

Workaround: Set preference mailnews.display.show_all_body_parts_menu and then chose "All Body Parts" in "View > Message Body As".
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1367973


a year ago
Summary: Emails with PDF attachments sent by Twitter are not parsed correctly → Emails with PDF attachments sent by Twitter don't show the attachment due to incorrect MIME structure where attachment sits in last part of multipart/alternative


4 months ago
Duplicate of this bug: 1467325
You need to log in before you can comment on or make changes to this bug.