﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28196	Character Encoding on EmailMessage when sending	Helmut	nobody	"I'm not 100% sure if this is bug, or whether my understand of unicode is wrong. Nevertheless Django 1.11 behaves differently than 1.10.7. Using Django 1.10.7, if I send an Email using EmailMessage, but I encode the subject and body with UTF-8, it sends successfully. For example:
{{{#!python
email = EmailMessage(""asd’asd"".encode(""utf-8""), ""asd’asd"".encode(""utf-8""), ""blah@foo.com"", [""yup@yadda.com""])
email.send()
}}}
But if I run the same code in Django 1.11, it throws an exception because of the unicode character that was used:
'ascii' codec can't decode byte 0xe2 in position 92: ordinal not in range(128)

So, might there be a bug in 1.11, or should I not be using the "".encode""? (Was using that because of weird user input)

And furthermore, why does pre-1.11 not throw an exception?

I thank you for you attention."	Bug	closed	Core (Mail)	1.11	Normal	invalid	emailmessage, send, email, unicode		Unreviewed	0	0	0	0	0	0
