There are several parts for an email which is defined by RFC822. I think that there should be different stuctures of a mail for different implementation of RFC822. Well, how to get mail structure with part numbers using imap command?
I have get an article here, which is said:
Message structure
The structure of an email message is generally something like this, with part numbers:
1 - Multipart/alternative headers
1.1 - Plain text message
1.2 - HTML version of message
2 - Inline attachment, etc
In Apple Mail it's like this instead:
1 - Plain text message
2 - Multipart/alternative headers
2.1 - HTML version of the message
2.2 - Inline attachment, etc
If the message has been forwarded, then it will look like this:
1 - Multipart/alternative headers
1.1 - Plain text message
1.2 - HTML version of message
2 - Message/RFC822
2.0 - Attached message header
2.1 - Plain text message
2.2 - HTML version of message
2.3 - Inline attachment, etc
Apple Mail does it differently again, and it's more complicated. I won't bother showing it here.
For example, I want to know the structure of gmail. Is there any imap commands can doing this? well, some other alternative way will be fine either, such as pop command or something else?