Extract zip file from email attachment

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sat Apr 7 01:43:44 EDT 2007


Basilisk96 wrote:
> >
> > Could the file like object still be encoded in MIME or something?
> >
>
> Yes it is. You don't need to seek(0).
> Try this:
>
> decoded = email.base64mime.decode(part.get_payload())
> fileObj.write(decoded)
>
>
> -Basilisk96




More information about the Python-list mailing list