MimeWriter and PDFs

Uwe Hoffmann qual at epost.de
Fri May 2 07:46:55 EDT 2003


Brandon wrote:

>         f = subwriter.startbody('application/octet-stream; name="%s"'
> % fName)
the following line should be better
>         #f = subwriter.startbody('application/pdf; name="%s"' % fName)
>         subwriter.flushheaders()
>         base64.encode(open('%s' % eMail[1], 'r'), f)
just a guess, instead use
	base64.encode(open('%s' % eMail[1], 'rb'), f)

maybe this helps

uwe







More information about the Python-list mailing list