From 04631b0dc33f87956c6acc83be19827e9543021f Mon Sep 17 00:00:00 2001 From: bolidecaster Date: Wed, 26 Nov 2014 16:04:23 +0800 Subject: [PATCH] fixed encoding errors for py3 --- marrow/mailer/transport/smtp.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/marrow/mailer/transport/smtp.py b/marrow/mailer/transport/smtp.py index e841f4d..7cdc7e1 100644 --- a/marrow/mailer/transport/smtp.py +++ b/marrow/mailer/transport/smtp.py @@ -109,10 +109,10 @@ def deliver(self, message): raise TransportExhaustedException() def send_with_smtp(self, message): - sender = bytes(message.envelope) - recipients = message.recipients.string_addresses - content = bytes(message) - + sender = str(message.envelope) + recipients = [addr.decode('utf-8') for addr in message.recipients.string_addresses] + content = str(message) + try: self.connection.sendmail(sender, recipients, content) self.sent += 1