I have recently faced the same thing while developing a Django app
that processes emails too.
But I found a quick fix, unicode() accepts argument, that tells it
what to do when it stumbles upon non-valid character:

email.mail_from = unicode(email['From'], errors = 'ignore')

Possible values for "errors" are 'strict' (which is default - raises
exception), 'ignore' - just removes invalid character from string and
'replace' - replaces invalid character with U+FFFD

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to