Handling emails

Nobody nobody at nowhere.com
Sun Jun 12 21:46:17 EDT 2011


On Sun, 12 Jun 2011 21:57:38 +0800, TheSaint wrote:

> However, some line will fail to decode correctly. I can't imagine why emails 
> don't comply to a standard.

Any headers should be in ASCII; Non-ASCII characters should be encoded
using quoted-printable and/or base-64 encoding.

Any message with non-ASCII characters in the headers can safely be
discarded as spam (I've never seen this bug in "legitimate" email).
Many MTAs will simply reject such messages.

The message body can be in any encoding, or in multiple encodings (e.g.
for multipart/mixed content), or none (e.g. the body may be binary data
rather than text).




More information about the Python-list mailing list