12.2.1.1 Deprecated methods

Changed in version 2.4: The add_payload() method was removed; use the attach() method instead.

The following methods are deprecated. They are documented here for completeness.

get_type( [failobj])
Return the message's content type, as a string of the form maintype/subtype as taken from the Content-Type: header. The returned string is coerced to lowercase.

If there is no Content-Type: header in the message, failobj is returned (defaults to None).

Deprecated since release 2.2.2. Use the get_content_type() method instead.

get_main_type( [failobj])
Return the message's main content type. This essentially returns the maintype part of the string returned by get_type(), with the same semantics for failobj.

Deprecated since release 2.2.2. Use the get_content_maintype() method instead.

get_subtype( [failobj])
Return the message's sub-content type. This essentially returns the subtype part of the string returned by get_type(), with the same semantics for failobj.

Deprecated since release 2.2.2. Use the get_content_subtype() method instead.

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