Today I wasted over an hour trying to receive mail in App Engine. Every time I'd try to use it, I'd get errors like:
'module' object has no attribute 'Message'
Traceback (most recent call last):
File "/base/python_lib/versions/1/google/appengine/ext/webapp/__init__.py", line 509, in __call__
File "/base/python_lib/versions/1/google/appengine/ext/webapp/mail_handlers.py", line 58, in post
File "/base/python_lib/versions/1/google/appengine/api/mail.py", line 546, in __init__
mime_message = _parse_mime_message(mime_message)
File "/base/python_lib/versions/1/google/appengine/api/mail.py", line 227, in _parse_mime_message
if isinstance(mime_message, email.Message.Message):
AttributeError: 'module' object has no attribute 'Message'
Turns out I'd named my file "email.py", which is a builtin module for python. Rename it and it works fine.
Don't forget to delete the email.pyc, or your dev_appserver will complain about "ImportError: No module named email.message".