Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kiil opened this issue Dec 17, 2024 · 4 comments
Open
Labels
invalid This doesn't seem right question Further information is requested

Comments

@kiil
Copy link

kiil commented Dec 17, 2024

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?

@soywod
Copy link
Member

soywod commented Dec 19, 2024

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 soywod added question Further information is requested invalid This doesn't seem right labels Dec 19, 2024
@kiil
Copy link
Author

kiil commented Dec 19, 2024

@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?

@soywod
Copy link
Member

soywod commented Dec 19, 2024

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.

@kiil
Copy link
Author

kiil commented Dec 19, 2024

Thank you so much!

Both for the support and for making himalaya.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants