saving .zip or .txt email attachments instead of deleting them

scrimp scrimp212 at yahoo.com
Fri Jun 3 13:42:42 EDT 2005


Here is the complete traceback..sorry about that though.

I used the run button and entered in "C:\email.txt" for the msgfile
parameter thats used for input

This email.txt file has a zip file attached to it and is all in text,
so hopefully I am working with the correct input file. I used the pop3
example given in the python documentation to pick up a message on the
mail server and read and wrote the information to a file --> email.txt

Traceback (most recent call last):
  File
"C:\PYTHON23\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py",
line 310, in RunScript
    exec codeObject in __main__.__dict__
  File "C:\My Documents\python scripts\EmailUnpack.py", line 83, in ?
    main()
  File "C:\My Documents\python scripts\EmailUnpack.py", line 71, in
main
    ext = mimetypes.guess_extension(part.get_type())
  File "C:\PYTHON23\lib\mimetypes.py", line 178, in guess_extension
    extensions = self.guess_all_extensions(type, strict)
  File "C:\PYTHON23\lib\mimetypes.py", line 157, in
guess_all_extensions
    type = type.lower()
AttributeError: 'NoneType' object has no attribute 'lower'

Again, thanks!

--Barry




More information about the Python-list mailing list