Answer the question
In order to leave comments, you need to log in
Why does Django have strange encoding when sending email?
Sending HTML:
msg = EmailMessage(subject, HTML, from_user, [email])
msg.content_subtype = "html"
msg.send()
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DU=
TF-8">
<td style=3D"vertical-align: top; backgr=
ound: #2D3349; text-align: center;border-radius: 3px 3px 0 0;padding: 40px =
0px;">
=D0=A4=D0=BE=D0=
=BD=D0=B4 =D0=90=D0=BB=D1=8C=D1=82=D0=B5=D1=80=D0=BD=D0=B0=D1=82=D0=B8=D0=
=B2=D0=BD=D1=8B=D1=85 =D0=98=D0=BD=D0=B2=D0=B5=D1=81=D1=82=D0=B8=D1=86=D0=
=B8=D0=B9
Answer the question
In order to leave comments, you need to log in
https://www.google.com.ua/search?q=http-equiv%3D3D
The HTML is encoded with what is called quoted-printable . Basically an = at the end of a line indicates a line wrap, so
he=
llo
should be read as "hello" and not as "he llo"
because the = has this special meaning some other character (sequence) is needed to put = characters in the text literally, and that is =3D
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question