Reputation: 67340
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?
Upvotes: 0
Views: 438
Reputation: 1192
In theory, only multipart/ and message/ can parent other types (per RFC2046).
Upvotes: 1
Reputation: 1590
Your question assumes that mail clients follow the RFC standards for MIME encoding, which they don't. I'd advise you collect a bunch of mail from sources and try and process it as-it-exists. The problem you are facing is extremely difficult (perhaps impossible) to solve 100%.
Upvotes: 0