Mercurial > p > roundup > code
diff roundup/cgi/client.py @ 5493:725266c03eab
updated mailgw to no longer use mimetools based on jerrykan's patch
| author | Christof Meerwald <cmeerw@cmeerw.org> |
|---|---|
| date | Sun, 12 Aug 2018 16:15:10 +0100 |
| parents | 52cb53eedf77 |
| children | db3a95f28b3c |
line wrap: on
line diff
--- a/roundup/cgi/client.py Sun Aug 12 16:05:42 2018 +0100 +++ b/roundup/cgi/client.py Sun Aug 12 16:15:10 2018 +0100 @@ -32,7 +32,7 @@ FormError, NotFound, NotModified, Redirect, SendFile, SendStaticFile, DetectorError, SeriousError) from roundup.cgi.form_parser import FormParser -from roundup.mailer import Mailer, MessageSendError, encode_quopri +from roundup.mailer import Mailer, MessageSendError from roundup.cgi import accept_language from roundup import xmlrpc @@ -1538,12 +1538,11 @@ to = [self.mailer.config.ADMIN_EMAIL] message = MIMEMultipart('alternative') self.mailer.set_message_attributes(message, to, subject) - part = MIMEBase('text', 'html') - part.set_charset('utf-8') - part.set_payload(html) - encode_quopri(part) + part = self.mail.get_text_message('utf-8', 'html') + part.set_payload(html, part.get_charset()) message.attach(part) - part = MIMEText(txt) + part = self.mail.get_text_message() + part.set_payload(text, part.get_charset()) message.attach(part) self.mailer.smtp_send(to, message.as_string())
