Google

12.2.2.2 Additional notes

Here are some notes on the parsing semantics:

  • Most non-multipart type messages are parsed as a single message object with a string payload. These objects will return 0 for is_multipart().
  • One exception is for message/delivery-status type messages. Because the body of such messages consist of blocks of headers, Parser will create a non-multipart object containing non-multipart subobjects for each header block.
  • Another exception is for message/* types (more general than message/delivery-status). These are typically message/rfc822 messages, represented as a non-multipart object containing a singleton payload which is another non-multipart Message instance.

See About this document... for information on suggesting changes.