diff options
| author | tkikuchi | 2006-01-29 05:07:46 +0000 |
|---|---|---|
| committer | tkikuchi | 2006-01-29 05:07:46 +0000 |
| commit | 383d8270072783e81116fe32498c4542cb974b55 (patch) | |
| tree | 910d78c0339ebe31f76e40695f2444cb1dbffb8d /Mailman/Message.py | |
| parent | 3ac45dfcbd0ecc3713ff8f09edb01246ac2cb7aa (diff) | |
| download | mailman-383d8270072783e81116fe32498c4542cb974b55.tar.gz mailman-383d8270072783e81116fe32498c4542cb974b55.tar.zst mailman-383d8270072783e81116fe32498c4542cb974b55.zip | |
Diffstat (limited to 'Mailman/Message.py')
| -rw-r--r-- | Mailman/Message.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Mailman/Message.py b/Mailman/Message.py index 4a0d7c7c0..bdf7e7185 100644 --- a/Mailman/Message.py +++ b/Mailman/Message.py @@ -199,6 +199,17 @@ class Message(email.Message.Message): except (UnicodeError, LookupError, ValueError): return failobj + def set_payload(self, payload, charset=None): + """Set the payload to the given value (Override email package). + Payload is converted to a MIME message body when this is called. + """ + email.Message.Message.set_payload(self, payload, charset) + if self.get('content-transfer-encoding') in \ + ('quoted-printable', 'base64'): + cset = self.get_charset() + if cset: + self._payload = cset.body_encode(self._payload) + self._charset = None class UserNotification(Message): |
