diff --git a/wiki/mail.py b/wiki/mail.py index a6472418..77489bce 100644 --- a/wiki/mail.py +++ b/wiki/mail.py @@ -76,6 +76,13 @@ def sendmail(request, to, subject, text, **kw): charset.body_encoding = QP msg.set_charset(charset) + #### HACK BACKPORT + # work around a bug in python 2.4.3 and above: + msg.set_payload('=') + if msg.as_string().endswith('='): + text = charset.body_encode(text) + #### FIN DU HACK + msg.set_payload(text) # Create message headers