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

A command to retrieve the raw message #79

Closed
srid opened this issue Apr 8, 2021 · 4 comments
Closed

A command to retrieve the raw message #79

srid opened this issue Apr 8, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@srid
Copy link
Contributor

srid commented Apr 8, 2021

h read only returns the text body, but it would be useful to have a command that returns the entire raw message. In JSON mode (-o json), the output could be in a structured form, instead of just dumping the raw email message.

This would be analogous to h write which does take a raw message.

@soywod
Copy link
Member

soywod commented Apr 8, 2021

I totally agree. It should not be so hard, since I have the raw message in memory!

@soywod soywod added cli enhancement New feature or request labels Apr 8, 2021
@srid
Copy link
Contributor Author

srid commented Apr 8, 2021

As an aside, I like the idea behind the template command, which also some potential for improvement as well.

I plan to use himalaya mostly in scripts, and being able to even fill in "template variables" would be handy in that workflow. For eg.,

echo Ping | h template new [email protected] --subject=Hello --body-stdin | h send --stdin

@soywod
Copy link
Member

soywod commented Apr 8, 2021

First I wanted to add a new type to the arg --mime-type. But it's not so clear in which category we should put this "raw" mode (text/plain? application/octet-stream?). So I decided to introduce a new flag --raw that returns the raw message as UTF8 encoded string. Let me know what you think about it.

@soywod
Copy link
Member

soywod commented Apr 8, 2021

Added in v0.2.4 🎉

@soywod soywod self-assigned this Apr 17, 2021
@soywod soywod added this to the v1 milestone Apr 17, 2021
@soywod soywod removed their assignment Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants