thunderbird / thunderbird/thunderbird-android

Message Reader - Add support for Inline image when `Content-Type: multipart/mixed` and no `Content-ID` header is present

Open
#11,174 0 comments 0 reactions 1 assignee View on GitHub

@rafaeltonholo is already working on this.

Since Jun 22, 2026.

type: enhancement
Dominant language
Kotlin
Stars
14k
Forks
2.8k
Avg merge
3d 3h
Merged PRs (30d)
57

Description

🎯 The objective

Some email clients, like Apple Mail, occasionally send emails with a Content-Type: multipart/mixed. In these cases, an inline image is included in the message body without an HTML tag or a Content-ID header.

This creates an issue in TfA, where the image is displayed only as an attachment rather than being inlined, leading to incorrect and unusual rendering of the message body.

Currently, TfA only supports inline images that have a Content-ID header and are included within an HTML <img /> tag.

The goal of this milestone is to enhance support for inline images, aligning our feature set with that of Thunderbird for Desktop.

🎒 Resources
Thunderbird for Desktop

Thanks, @maxemig, for providing these resources.

Thunderbird libmime multipart subtypes (dispatch: mailnews/mime/src/mimei.cpp#573-642; all derive from base MimeMultipart in mimemult.cpp).

  • multipart/mixed (mimemmix.cpp): the baseline. Parts shown sequentially in order; any part with a provided filename is also listed as an attachment. Unknown subtypes fall back to this.
  • multipart/related (mimemrel.cpp): one "head" part (the HTML body); the rest are NOT shown as separate parts but registered by Content-ID/Content-Location for cid: rewriting into the body. Overrides output_child_p. Orphan part with no CID/Content-Location -> output as a normal attachment instead of being dropped.

Implementation notes:

  • Inline render - mimei.cpp#mime_create(): image/png -> mimeInlineImageClass, CD "inline" keeps the class; images are even exempt from the attachment demotion block.
  • Attachment listing - mimemoz2.cpp#NotifyEmittersOfAttachmentList(): an inline, displayable part is hidden ONLY if it has no provided filename. A filename (CD filename= or CT name=) sets m_realName/m_hasFilename, so the skip gate is not taken, and it is listed.

Gate = presence of a provided filename (m_hasFilename), set at:
https://searchfox.org/comm-central/source/mailnews/mime/src/mimemoz2.cpp#434-448


Thunderbird for Android

🦮 Rules of the Road

🟢 In Scope
  • Create an RFC for the given feature
  • Create a Technical Design for the given feature
  • Implementation TBD.
🔴 Out of Scope
  • TBD
🚧 Technical and/or Business Requirements
  • TBD

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.