Return a list containing the charset(s) used in this message. The returned list of items describes the Content-Type headers' charset parameter for this message and all the subparts in its payload. Each item will either be a string (the value of the charset parameter
(self, failobj=None)
| 953 | return charset.lower() |
| 954 | |
| 955 | def get_charsets(self, failobj=None): |
| 956 | """Return a list containing the charset(s) used in this message. |
| 957 | |
| 958 | The returned list of items describes the Content-Type headers' |
| 959 | charset parameter for this message and all the subparts in its |
| 960 | payload. |
| 961 | |
| 962 | Each item will either be a string (the value of the charset parameter |
| 963 | in the Content-Type header of that part) or the value of the |
| 964 | 'failobj' parameter (defaults to None), if the part does not have a |
| 965 | main MIME type of "text", or the charset is not defined. |
| 966 | |
| 967 | The list will contain one string for each part of the message, plus |
| 968 | one for the container message (i.e. self), so that a non-multipart |
| 969 | message will still return a list of length 1. |
| 970 | """ |
| 971 | return [part.get_content_charset(failobj) for part in self.walk()] |
| 972 | |
| 973 | def get_content_disposition(self): |
| 974 | """Return the message's content-disposition if it exists, or None. |