saving an e-mail attachement

Aspersieman aspersieman at gmail.com
Fri Aug 1 04:08:24 EDT 2008


robinsiebler at gmail.com wrote:
> I'm trying to figure out how to save an e-mail attachment from a POP3
> mailbox.  I've scoured the web, but -none- of the examples I have
> found have actually worked.  For instance, in this example:
> http://groups.google.com/group/comp.lang.python/browse_thread/thread/8423cad79ff21730/0d8922943a164ccf?lnk=gst&q=email+attachment#0d8922943a164ccf,
> fn is always None, but the e-mail -does- have an attachment (an xml
> file).
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>   
Try attached (caution *not* tested, I just cut and pasted it from a
larger script I use (it should work :) ).

I have used a similar method quite successfully.

HTH

Regards

Nicolaas

-- 

The three things to remember about Llamas:
1) They are harmless
2) They are deadly
3) They are made of lava, and thus nice to cuddle. 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: getemailattachments.py
Type: text/x-python
Size: 2351 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20080801/52f7a172/attachment.py>


More information about the Python-list mailing list