diff roundup/mailer.py @ 5828:bd245858c823

Fix ascii decoding error .. when using mailer.standard_message -- we need to pass the configured mail encoding.
author Ralf Schlatterbeck <rsc@runtux.com>
date Tue, 02 Jul 2019 18:15:51 +0200
parents b7fa56ced601
children 3491971eb694
line wrap: on
line diff
--- a/roundup/mailer.py	Tue Jun 25 17:02:52 2019 -0400
+++ b/roundup/mailer.py	Tue Jul 02 18:15:51 2019 +0200
@@ -142,9 +142,10 @@
 
         All strings are assumed to be UTF-8 encoded.
         """
+        charset = getattr(self.config, 'EMAIL_CHARSET', 'utf-8')
         message = self.get_standard_message()
         self.set_message_attributes(message, to, subject, author)
-        message.set_payload(s2u(content))
+        message.set_payload(s2u(content), charset=charset)
         self.smtp_send(to, message.as_string())
 
     def bounce_message(self, bounced_message, to, error,

Roundup Issue Tracker: http://roundup-tracker.org/