email

Simon Faulkner news at titanic.co.uk
Sun Oct 20 15:07:03 EDT 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?

Simon


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

>I am trying to use the new email class to save an file attached to an
>email
>
>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...
>
>TIA
>
>
>Simon




More information about the Python-list mailing list