[Email-SIG] Converting to quoted printable encoding

Nicholas Cole nicholas.cole at gmail.com
Wed Sep 24 21:25:37 CEST 2008


My naive attempt to convert a MIMEText message part to quoted
printable (having read the documentation) looked something like this:

E = email.mime.text.MIMEText("This is some text")
email.encoders.encode_quopri(E)
print E.as_string()

But it yields a message with two Content-Transfer-Encoding headers.

I'm assuming that this is not a bug - but what is "The Right Way"(TM)
to change the encoding of text?

Best, N


More information about the Email-SIG mailing list