get_charset(returns the character set associated with the message payload (for instance'iso- - ' get_charsets([default]returns list of all character sets that appear in the message for multipart messagesthe list will represent the character set of each subpart the character set of each part is taken from 'content-typeheaders that appear in the message if no character set is specified or the content-type header is missingthe character set for that part is set to the value of default (which is none by defaultm get_content_charset([default]returns the character set from the first 'content-typeheader in the message if the header is not found or no character set is specifieddefault is returned get_content_maintype(returns the main content type (for example'textor 'multipart' get_content_subtype(returns the subcontent type (for example'plainor 'mixed' get_content_type(returns string containing the message content type (for example'multipart/mixedor 'text/plain' get_default_type(returns the default content type (for example'text/plainfor simple messagesm get_filename([default]returns the filename parameter from 'content-dispositionheaderif any returns default if the header is missing or does not have filename parameter get_param(param [default [header [unquote]]]email headers often have parameters attached to them such as the 'charsetand 'formatparts of the header 'content-typetext/plaincharset="utf- "format=flowedthis method returns the value of specific header parameter param is parameter namedefault is default value to return if the parameter is not foundheader is the name of the headerand unquote specifies whether or not to unquote the parameter if no value is given for headerparameters are taken from the 'content-typeheader the default value of unquote is true the return value is either string or -tuple (charsetlanguagevaluein the event the parameter was encoded according to rfc- conventions in this casecharset is string such as 'iso- - 'language is string containing language code such as 'en'and value is the parameter value get_params([default [header [unquote]]]returns all parameters for header as list default specifies the value to return if the header isn' found if header is omittedthe 'content-typeheader is used unquote is flag that specifies whether or not to unquote values (true by defaultthe contents lib fl ff