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
False
for is_multipart(). Their
get_payload() method will return a string object.
- All multipart type messages will be parsed as a
container message object with a list of sub-message objects for
their payload. The outer container message will return
True
for is_multipart() and their
get_payload() method will return the list of
Message subparts.
- Most messages with a content type of message/*
(e.g. message/delivery-status and
message/rfc822) will also be parsed as container
object containing a list payload of length 1. Their
is_multipart() method will return
True
. The
single element in the list payload will be a sub-message object.
Release 2.3.5, documentation updated on February 8, 2005.
See About this document... for information on suggesting changes.