pimalaya/himalaya

Attachments when sending mail do not seem to work like described in the FAQ

Opened this issue · 4 comments

kiil commented

So I needed to apply for a job and attach my curriculum.

According to the FAQ in the README of Himalaya I can do this like so:

<#part filename=/path/to/file.pdf><#/part>

So in my application email I did the following at the end of the text:

CV:
<#part filename=/home/lk/Downloads/Lennart_Kiil_CV.pdf><#/part>

The email was sent to the employer. But without the attachment!

Instead the e-mail looked like so:

Mange tak og venlig hilsen,

Lennart

CV:
<#part filename=/home/lk/Downloads/Lennart_Kiil_CV.pdf><#/part>

So the "embedding" is just output as plain text, apparently.

How can I actually send attachments with Himalaya?

Before replying to you, I tested the feature and it works as expected.

So in my application email I did the following at the end of the text:

Which email application did you try it?

The <#part filename=…><#/part> syntax only works inside Himalaya usage, when using one of the following command:

  • himalaya message write
  • himalaya message reply
  • himalaya message forward
  • himalaya message edit

As described in the FAQ, these commands will spawn a buffer in your main text editor defined in $EDITOR. After edition you will be prompted what to do with this message.

kiil commented

@soywod Yes, when doing it like that, it does work :)

I need to do it programmatically though, like this

himalaya message send "TO: xxxxx@gmail.com\n\nFROM: xxxxx@gmail.com\n\nBody\n\n<#part filename=/home/lk/Downloads/Lennart_Kiil_CV.pdf><#/part>"

Is that somehow possible?

You can achieve it via the template subcommand:

himalaya template send "TO: xxxxx@gmail.com\n\nFROM: xxxxx@gmail.com\n\nBody\n\n<#part filename=/home/lk/Downloads/Lennart_Kiil_CV.pdf><#/part>"

The difference between himalaya message {save,send} and himalaya template {save,send} is subtile: the first one saves and sends raw messages whereas second one saves and sends templates (containing MML markup you are using). They are compiled into valid MIME message before saving and sending.

kiil commented

Thank you so much!

Both for the support and for making himalaya.