My app receives mail and stores them in the datastore.  It usually
works fine, but occasionally it has problems decoding the message
body.

It logs errors like:

    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in
position 50: ordinal not in range(128)

The error happens when trying to decode the message body:

    bodytext = message.bodies(content_type='text/plain').next()
[1].decode()

Question 1 - do I really need to muck around with detecting different
encodings on each email, or is there an app engine function that makes
it "just work"?

Question 2 - app engine keeps retrying these failed messages, and they
keep failing.  How can I clear them from the queue?

--

You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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/google-appengine?hl=en.


Reply via email to