[Tutor] I am trying to read and decode an emails PDF attachment via python,

dave selby dave6502 at gmail.com
Sun Aug 21 08:24:06 CEST 2011


Did a lot more digging and finally sorted it, sorry for bothering you guys,

Cheers

Dave

On 20 August 2011 10:58, dave selby <dave6502 at gmail.com> wrote:
> I am trying to read and decode an emails PDF attachment via python,
> its a dedicated mailbox, anything emailed there is to be read by the
> script, deleted from the mailbox and processed.
>
> http://pastebin.com/VA1gwWH3
>
> def get_next_mail() works AOK, I get a nice long string containing the
> next email and PDF data block but when I execute
>
> msg.is_multipart()
> I get False ???
>
> And when I execute
> msg.get_payload()
> I get nothing
>
> Any ideas anyone, at a guess its because my string is not formatted
> correctly, can anyone advise ?
>
> Cheers
>
> Dave
>
> --
>
> Please avoid sending me Word or PowerPoint attachments.
> See http://www.gnu.org/philosophy/no-word-attachments.html
>



-- 

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html


More information about the Tutor mailing list