Under Development
stars

Understanding MIME#

Quite a bit of effort has been made to make NeoMutt the premier text-mode MIME MUA. Every effort has been made to provide the functionality that the discerning MIME user requires, and the conformance to the standards wherever possible. When configuring NeoMutt for MIME, there are two extra types of configuration files which NeoMutt uses. One is the mime.types file, which contains the mapping of file extensions to IANA MIME types. The other is the mailcap file, which specifies the external commands to use for handling specific MIME types.

MIME Multipart/Multilingual#

NeoMutt includes support for reading and writing multipart/multilingual emails. A multipart/multilingual email is like a multipart/alternative email, except that it comes with parts of different versions of languages instead of appearances. Its format is described by RFC8255.

Reading Multipart/Multilingual Emails#

NeoMutt uses the $preferred_languages variable to determine which languages to display when displaying a multipart/multilingual email. You can have several preferred languages, separated by ,:

set preferred_languages="fr,en,de"

NeoMutt will try to match these strings against the multilingual header in the received emails “by prefix”, e.g., en will match both en and en_US.

If $preferred_languages is not set, it defaults to None, and the first part of the received multipart/multilingual email will be displayed.

Composing Multipart/Multilingual Emails#

The procedure for composing a multipart/multilingual email is similar to those in Composing Multipart/Alternative. You have to prepare every part manually or using some scripts, and then tag and group them together into a multipart/multilingual bundle before sending it:

  1. Prepare parts of the multilingual emails.

  2. Attach them as attachments.

  3. Tag them with <tag-entry>.

  4. Edit the Content-Language header of every attachment with command <edit-language> (default to Ctrl-L). This is important, otherwise the recipient of this email will not know the corresponding languages. You can set arbitrary string as Content-Language, but it is recommended to set it as some common prefixes such as “en”, “zh” and “fr”.

  5. Group all the tagged messages together by <group-multilingual> (default to ^).

  6. Send the email as usual.

As in Composing Multipart/Alternative, you can also use NeoMutt’s macro and some external scripts to combine this procedure into one.

After grouping, the separate parts will be displayed in a tree structure. Attachments can still be edited separately and reordered within the group, but must be ungrouped using the <ungroup-attachment> (#) binding for more advanced editing before tagging and grouping together again as described above.

📷 Screenshot Needed

Subject: MIME attachment tree in compose menu

Description: The NeoMutt compose screen showing a multipart message with a nested MIME tree structure — e.g. a multipart/mixed containing a multipart/alternative with text/plain and text/html parts, plus a file attachment. The tree indentation and part numbering should be visible.

Highlights: The reader should notice how NeoMutt renders the hierarchical MIME structure as an indented tree with type annotations, showing the parent-child relationship between multipart containers and their leaf parts.