email.mime.multipart.MIMEMultipart

class email.mime.multipart.MIMEMultipart(_subtype='mixed', boundary=None, _subparts=None, **_params) Module: email.mime.multipart A subclass of MIMEBase, this is an intermediate base class for MIME messages that are multipart. Optional _subtype defaults to mixed, but can be used to specify the subtype of the message. A Content-Type header of multipart/_subtype will be added to the message object. A MIME-Version header will also be added. Optional boundary is the multipart boundary string. Wh

email.mime.message.MIMEMessage

class email.mime.message.MIMEMessage(_msg, _subtype='rfc822') Module: email.mime.message A subclass of MIMENonMultipart, the MIMEMessage class is used to create MIME objects of main type message. _msg is used as the payload, and must be an instance of class Message (or a subclass thereof), otherwise a TypeError is raised. Optional _subtype sets the subtype of the message; it defaults to rfc822.

email.mime.image.MIMEImage

class email.mime.image.MIMEImage(_imagedata, _subtype=None, _encoder=email.encoders.encode_base64, **_params) Module: email.mime.image A subclass of MIMENonMultipart, the MIMEImage class is used to create MIME message objects of major type image. _imagedata is a string containing the raw image data. If this data can be decoded by the standard Python module imghdr, then the subtype will be automatically included in the Content-Type header. Otherwise you can explicitly specify the image subtyp

email.mime.base.MIMEBase

class email.mime.base.MIMEBase(_maintype, _subtype, **_params) Module: email.mime.base This is the base class for all the MIME-specific subclasses of Message. Ordinarily you won’t create instances specifically of MIMEBase, although you could. MIMEBase is provided primarily as a convenient base class for more specific MIME-aware subclasses. _maintype is the Content-Type major type (e.g. text or image), and _subtype is the Content-Type minor type (e.g. plain or gif). _params is a parameter key

email.mime.audio.MIMEAudio

class email.mime.audio.MIMEAudio(_audiodata, _subtype=None, _encoder=email.encoders.encode_base64, **_params) Module: email.mime.audio A subclass of MIMENonMultipart, the MIMEAudio class is used to create MIME message objects of major type audio. _audiodata is a string containing the raw audio data. If this data can be decoded by the standard Python module sndhdr, then the subtype will be automatically included in the Content-Type header. Otherwise you can explicitly specify the audio subtyp

email.mime.application.MIMEApplication

class email.mime.application.MIMEApplication(_data, _subtype='octet-stream', _encoder=email.encoders.encode_base64, **_params) Module: email.mime.application A subclass of MIMENonMultipart, the MIMEApplication class is used to represent MIME message objects of major type application. _data is a string containing the raw byte data. Optional _subtype specifies the MIME subtype and defaults to octet-stream. Optional _encoder is a callable (i.e. function) which will perform the actual encoding o

email.message_from_string()

email.message_from_string(s, _class=email.message.Message, *, policy=policy.compat32) Return a message object structure from a string. This is exactly equivalent to Parser().parsestr(s). _class and policy are interpreted as with the Parser class constructor. Changed in version 3.3: Removed the strict argument. Added the policy keyword.

email.message_from_file()

email.message_from_file(fp, _class=email.message.Message, *, policy=policy.compat32) Return a message object structure tree from an open file object. This is exactly equivalent to Parser().parse(fp). _class and policy are interpreted as with the Parser class constructor. Changed in version 3.3: Removed the strict argument. Added the policy keyword.

email.message_from_bytes()

email.message_from_bytes(s, _class=email.message.Message, *, policy=policy.compat32) Return a message object structure from a byte string. This is exactly equivalent to BytesParser().parsebytes(s). Optional _class and strict are interpreted as with the Parser class constructor. New in version 3.2. Changed in version 3.3: Removed the strict argument. Added the policy keyword.

email.message_from_binary_file()

email.message_from_binary_file(fp, _class=email.message.Message, *, policy=policy.compat32) Return a message object structure tree from an open binary file object. This is exactly equivalent to BytesParser().parse(fp). _class and policy are interpreted as with the Parser class constructor. New in version 3.2. Changed in version 3.3: Removed the strict argument. Added the policy keyword.