Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try converting the final email body to utf8 before sending. #385

Merged
merged 3 commits into from Aug 26, 2015

Conversation

ralphbean
Copy link
Contributor

This is intended to address #377, but I'm not sure if it will fix it or not.

Also made a cosmetic commit to address readability.

@@ -431,7 +431,7 @@ def send_mail(from_addr, to_addr, subject, body_text, headers=None):
for key, value in headers.items():
msg.append('%s: %s' % (key, to_bytes(value)))
msg += ['Subject: %s' % subject, '', body_text]
body = '\r\n'.join(msg)
body = to_bytes('\r\n').join(msg)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're only converting the \r\n to bytes

@lmacken
Copy link
Contributor

lmacken commented Aug 26, 2015

👍

lmacken added a commit that referenced this pull request Aug 26, 2015
Try converting the final email body to utf8 before sending.
@lmacken lmacken merged commit 331e564 into develop Aug 26, 2015
@lmacken lmacken deleted the feature/mail-encoding branch August 26, 2015 18:22
@pypingou
Copy link
Member

I think there is another way to do this

@pypingou
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants