"scrimp" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> How would I go about retriving an email message and stripping out the
> attachment into a file. I have seen examples where they would read in
> the file and delete the attachment and replace it with text saying that
> the attachment was removed.
>
> For testing purposes Im using a pop3 server to receive messages from. I
> can log into the pop3 server get all the messages and print them to the
> screen or to a file.
>
> I have another script that I got from ActiveSource that deletes the
> attachment. This is where I will need to save the attachment instead of
> deleting it. Any help is appreciated thanks!

Look at the documentation for the email module in the Python Library
Reference. The final example shows how to read an email and save
all the parts into a directory. It's almost usable as is; I had to tweak
it just a little for what I wanted it to do.

John Roth

>
> --Barry
> 

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to