Simon Faulkner news at
Sun Oct 20 21:07:03 CEST 2002

Found it.

for part in msg.walk():
  data = part,get_payload(decode=1)

Is it me or is the documentation hard to work with?


On Sun, 20 Oct 2002 19:29:38 +0100, Simon Faulkner
<news at> wrote:

>I am trying to use the new email class to save an file attached to an
>In it's very simplest form
>data = msg.get_payload(1,True) won't return the decoded data
>How might I get the data out and save it to a file?
>It is always in the 2nd part of the MIME Message and base64 encoded...
>fun, fun, fun...

More information about the Python-list mailing list