On Wed, 14 Nov 2012 09:58:30 -0800, Tobiah wrote:
> I just found out that the attachment works fine when I read the mail
> from the gmail website. Thunderbird complains that the attachment is
> empty.
I suggest that you use Thunderbird to send yourself an email with a PDF
attachment, then inspect how it is attached. How does that differ from
the one you are sending from Python?
When I try sending a PDF from mutt, I get:
Content-Type: application/pdf
Content-Disposition: attachment; filename="foo.pdf"
Content-Transfer-Encoding: base64
I haven't tried opening that in Thunderbird, but I expect it should be
okay.
The only difference I see between what you are sending and mutt is that
mutt doesn't include a MIME-version line. Perhaps Thunderbird doesn't
like that?
Wait... here's another thought. Perhaps Thunderbird doesn't know how to
display the PDF file, and is giving a bogus error message? Can your
Thunderbird display PDF files at all? Does it succeed when you use a
different PDF file? What if you send a JPEG?
--
Steven