himalaya icon indicating copy to clipboard operation
himalaya copied to clipboard

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

Open kiil opened this issue 1 year ago • 4 comments

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?

kiil avatar Dec 17 '24 09:12 kiil

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.

soywod avatar Dec 19 '24 08:12 soywod

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

I need to do it programmatically though, like this

himalaya message send "TO: [email protected]\n\nFROM: [email protected]\n\nBody\n\n<#part filename=/home/lk/Downloads/Lennart_Kiil_CV.pdf><#/part>"

Is that somehow possible?

kiil avatar Dec 19 '24 10:12 kiil

You can achieve it via the template subcommand:

himalaya template send "TO: [email protected]\n\nFROM: [email protected]\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.

soywod avatar Dec 19 '24 11:12 soywod

Thank you so much!

Both for the support and for making himalaya.

kiil avatar Dec 19 '24 12:12 kiil