index all rss twitter github linkedin email

Álvaro Ramírez

25 December 2018 Emailing pdfs to kindle from mu4e

Wanted to send a pdf to my kindle for some holiday reading. You can easily do this by emailing the pdf to your kindle-bound email address.

Now, I typically attach files when composing mu4e emails by using mml-attach-file, which attaches the file using <#part>…<#/part>. However, the Amazon service did not find the attached pdf, so no pdf was added to my Kindle.

Fortunately, I found a handy Reddit thread, leding me to a working solution. Wrapping the part using <#multipart type=mixed>…<#/multipart> did the job, using mml-insert-multipart, followed by mml-attach-file.

Resulting attachment should look something like:

<#multipart type=mixed>
<#part type="application/pdf" filename="/path/to/file.pdf" disposition=attachment>
<#/part>
<#/multipart>

I should add a convenience elisp function for this, but that's for another time…