ZendMail and Amazon's Kindle Converter

5 February 2011

If you’re trying to use Zend_Mail to send email to Amazon’s free PDF-to-Kindle converter, you might like to know that for some reason two headers that Zend_Mail adds to the message—Content-Transfer-Encoding and Content-Disposition—trick Amazon’s con­verter into think­ing that there are no attachments. (These emails are in­ter­preted cor­rectly by pretty much every­thing else as far as I can tell so I’m not sure if this is Zend_Mail’s fault, or Amazon’s, or both.)

There’s prob­a­bly several ways to fix this, but I fixed it by cre­at­ing a new version of Zend_Mail_Transport_Smtp:

Anyway, with this “bug” worked around, I can now do this:

My ~/Library/PDF Services/Send to Kindle reads:

(See “Providing PDF Work­flow Options in the Print Dialog” for more information.)