Show More
@@ -243,6 +243,13 b' def mimetextqp(body, subtype, charset):' | |||
|
243 | 243 | cs.body_encoding = email.charset.QP |
|
244 | 244 | break |
|
245 | 245 | |
|
246 | # On Python 2, this simply assigns a value. Python 3 inspects | |
|
247 | # body and does different things depending on whether it has | |
|
248 | # encode() or decode() attributes. We can get the old behavior | |
|
249 | # if we pass a str and charset is None and we call set_charset(). | |
|
250 | # But we may get into trouble later due to Python attempting to | |
|
251 | # encode/decode using the registered charset (or attempting to | |
|
252 | # use ascii in the absence of a charset). | |
|
246 | 253 | msg.set_payload(body, cs) |
|
247 | 254 | |
|
248 | 255 | return msg |
General Comments 0
You need to be logged in to leave comments.
Login now