email.message.Message.get_content_subtype()

get_content_subtype() Return the message’s sub-content type. This is the subtype part of the string returned by get_content_type().

email.message.Message.get_content_type()

get_content_type() Return the message’s content type. The returned string is coerced to lower case of the form maintype/subtype. If there was no Content-Type header in the message the default type as given by get_default_type() will be returned. Since according to RFC 2045, messages always have a default type, get_content_type() will always return a value. RFC 2045 defines a message’s default type to be text/plain unless it appears inside a multipart/digest container, in which case it would

email.message.Message.get_charsets()

get_charsets(failobj=None) Return a list containing the character set names in the message. If the message is a multipart, then the list will contain one element for each subpart in the payload, otherwise, it will be a list of length 1. Each item in the list will be a string which is the value of the charset parameter in the Content-Type header for the represented subpart. However, if the subpart has no Content-Type header, no charset parameter, or is not of the text main MIME type, then tha

email.message.Message.get()

get(name, failobj=None) Return the value of the named header field. This is identical to __getitem__() except that optional failobj is returned if the named header is missing (defaults to None).

email.message.Message.get_charset()

get_charset() Return the Charset instance associated with the message’s payload.

email.message.Message.get_boundary()

get_boundary(failobj=None) Return the value of the boundary parameter of the Content-Type header of the message, or failobj if either the header is missing, or has no boundary parameter. The returned string will always be unquoted as per email.utils.unquote().

email.message.Message.get_content_charset()

get_content_charset(failobj=None) Return the charset parameter of the Content-Type header, coerced to lower case. If there is no Content-Type header, or if that header has no charset parameter, failobj is returned. Note that this method differs from get_charset() which returns the Charset instance for the default encoding of the message body.

email.message.Message.get_all()

get_all(name, failobj=None) Return a list of all the values for the field named name. If there are no such named headers in the message, failobj is returned (defaults to None).

email.message.Message.del_param()

del_param(param, header='content-type', requote=True) Remove the given parameter completely from the Content-Type header. The header will be re-written in place without the parameter or its value. All values will be quoted as necessary unless requote is False (the default is True). Optional header specifies an alternative to Content-Type.

email.message.Message.as_bytes()

as_bytes(unixfrom=False, policy=None) Return the entire message flattened as a bytes object. When optional unixfrom is true, the envelope header is included in the returned string. unixfrom defaults to False. The policy argument may be used to override the default policy obtained from the message instance. This can be used to control some of the formatting produced by the method, since the specified policy will be passed to the BytesGenerator. Flattening the message may trigger changes to th