Skip to content

Commit

Permalink
fixed encoding errors for py3
Browse files Browse the repository at this point in the history
  • Loading branch information
bolidecaster committed Nov 26, 2014
1 parent ff276ba commit 04631b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions marrow/mailer/transport/smtp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 04631b0

Please sign in to comment.