Mail charset error support
- Try multiple charset when no charset is specified by "Content-Type" field : begins with sys.defaultencoding utf8 then "iso-8859-1", config file encoding and finally encoding found in previous fields "Subject" or "From". darcs-hash:20060201110843-86b55-7fd556a8ffadd9a5fed2b3317b17bfcca9d1dc58.gz
This commit is contained in:
@@ -32,6 +32,9 @@ def _create_multipart(encoded):
|
||||
part2 = MIMEText("Encoded multipart2 with 'iso-8859-15' charset (<28><><EFBFBD>)", \
|
||||
_charset = "iso-8859-15")
|
||||
msg.attach(part2)
|
||||
part3 = MIMEText("Encoded multipart3 with no charset (<28><><EFBFBD>)", \
|
||||
_charset = "")
|
||||
msg.attach(part3)
|
||||
else:
|
||||
part1 = MIMEText("Not encoded multipart1")
|
||||
msg.attach(part1)
|
||||
|
||||
Reference in New Issue
Block a user