diff options
Diffstat (limited to 'Lib/email/message.py')
| -rw-r--r-- | Lib/email/message.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/email/message.py b/Lib/email/message.py index 993a1ac..08423cd 100644 --- a/Lib/email/message.py +++ b/Lib/email/message.py @@ -256,6 +256,8 @@ class Message: charset=charset.get_output_charset()) else: self.set_param('charset', charset.get_output_charset()) + if isinstance(self._payload, unicode): + self._payload = self._payload.encode(charset.output_charset) if str(charset) != charset.get_output_charset(): self._payload = charset.body_encode(self._payload) if 'Content-Transfer-Encoding' not in self: |
