Search code examples
mime-typeshtml-emailemailemail-validation

What is the possible mimetype hierarchy of an email message?


I'm working with a snippet of code that recursively calls itself and tries to pull out a MIME Type part of text/html from an email (if it exists) for further processing.

The "text/html" could exist inside other content such as multipart/alternative, so I'm trying to find out if there is a defined hierarchy for email MIME Types.

Anybody know if there is and what it is? i.e. what types can parent other types?


Solution

  • In theory, only multipart/ and message/ can parent other types (per RFC2046).