Show HN: Send Emails from Your Terminal(github.com)
github.com
Show HN: Send Emails from Your Terminal
https://github.com/charmbracelet/pop
28 コメント
You can also send email from your terminal using a traditional mail agent like mutt, which also installs via homebrew, but doesn’t require a proprietary API key to send email. Mutt will happily send email as your Gmail user. Mutt can also read email, so if you really live in the terminal it can do it all.
https://www.makeuseof.com/install-configure-mutt-with-gmail-...
https://www.makeuseof.com/install-configure-mutt-with-gmail-...
neomutt even has a litany of cool new features like TLS SNI, threading and encrypt-to-self.
https://github.com/neomutt/neomutt
https://github.com/neomutt/neomutt
As other's have pointed out, sending emails from the command line is a solved problem [1]:
[1] https://stackoverflow.com/questions/57410259/how-to-send-an-...
sendmail [email protected] < email.txt
mail -s "Test Subject" [email protected] < body.txt
What keeps me from actually using this, is the lack of Address Book, as I don't memorize email addresses from all my friends and colleagues. Any suggestions on how to integrate my Gmail Address book into a command line workflow?[1] https://stackoverflow.com/questions/57410259/how-to-send-an-...
Provided you are willing to build the alias [1] mapping list, mutt can use aliases on the CLI to send emails.
So if you had aliased "[email protected]" to "bob", you could do:
[1] Mutt refers to its address book as "aliases".
So if you had aliased "[email protected]" to "bob", you could do:
mutt -s "Test Subject" bob < body.txt
I do not know of a way to automatically generate a mutt alias file from a gmail address book.[1] Mutt refers to its address book as "aliases".
You can use the `--to` flag and something like FZF or Gum to populate that from a text file.
`pop --to $(fzf contacts.txt)`
`pop --to $(fzf contacts.txt)`
Almost sounds like you need a user completion script that queries your address book. (Implementation left as an exercise for the reader).
> The email sending part is taken care by Resend, another developer-first product, which makes it the perfect integration for this.
Please add a disclaimer that you're one of the founders of Resend. I had no idea before clicking on your profile.
Please add a disclaimer that you're one of the founders of Resend. I had no idea before clicking on your profile.
I suppose that’s the answer to a few of the questions in this thread.
What is the problem with the mail command ? Or with some msmtp ?
Except that with "standard" mail you only need a provider or self-hosted server, and not a RESEND_KEY
To me, it looks like "reinventing the wheel"... Did I miss something ?
BTW: content generation (AI, email) is not email sending, so you can still generate content with other tools and send it with a simple "mail" command
Except that with "standard" mail you only need a provider or self-hosted server, and not a RESEND_KEY
To me, it looks like "reinventing the wheel"... Did I miss something ?
BTW: content generation (AI, email) is not email sending, so you can still generate content with other tools and send it with a simple "mail" command
Nope, this is just advertising for Resend. OP is the founder: https://news.ycombinator.com/item?id=36309120
> To use pop, you will need a RESEND_API_KEY.
NOPE. no thank you. cURL can already do this:
https://stackoverflow.com/questions/14722556/using-curl-to-s...
NOPE. no thank you. cURL can already do this:
https://stackoverflow.com/questions/14722556/using-curl-to-s...
telnet host port
ehlo mailback
mail from: [email protected]
rcpt to: [email protected]
data
mail from: "my name" <[email protected]>
rcpt to: "their name" <[email protected]>
subject: whatever
mail text goes here but don't forget an empty line between subject line and this line (as a separator of header and body)
and here
and end mail text by a single dot in a single line like this
.
quit
for attachments or other advanced features you can use mutt, pine, or any other mail app. you can also do:
cat mail-text.txt | mail -s "subject goes here" [email protected]
ehlo mailback
mail from: [email protected]
rcpt to: [email protected]
data
mail from: "my name" <[email protected]>
rcpt to: "their name" <[email protected]>
subject: whatever
mail text goes here but don't forget an empty line between subject line and this line (as a separator of header and body)
and here
and end mail text by a single dot in a single line like this
.
quit
for attachments or other advanced features you can use mutt, pine, or any other mail app. you can also do:
cat mail-text.txt | mail -s "subject goes here" [email protected]
Should be noted that telnet only works when you have unauthenticated access to your mail server.
I remember performing authentication via telnet session as well: https://susam.net/blog/auth-cram-md5.html (2011)
Of course, these days, the connection should be wrapped within a TLS session and openssl s_client could be a good alternative to telnet for doing that.
Of course, these days, the connection should be wrapped within a TLS session and openssl s_client could be a good alternative to telnet for doing that.
I typically love things from charm bracelet. They make phenomenally good looking TUIs. For that alone I will try to work with this. However, I do agree that there is a tendency in many of the projects to lean on unnecessary servers by default. For example, to have a local glow experience, you have to edit the config to not send your data (encrypted of course, which is good) to a centralized server.
I'm going to contradict myself here, but soft-serve is also phenomenal, but only works with self hosted git, but not gitlab. This is great (as said before, cloud should not be default) but sometimes you want to connect to a well known standard git server like gitlab.
Anyway, this looks great, despite the existence of aerc, etc. I think it's a welcome addition, but if the additionally API key can be removed, and if it can work with complicated emails like Oath 2 and Microsoft office webmail, it will likely take off.
I'm going to contradict myself here, but soft-serve is also phenomenal, but only works with self hosted git, but not gitlab. This is great (as said before, cloud should not be default) but sometimes you want to connect to a well known standard git server like gitlab.
Anyway, this looks great, despite the existence of aerc, etc. I think it's a welcome addition, but if the additionally API key can be removed, and if it can work with complicated emails like Oath 2 and Microsoft office webmail, it will likely take off.
Is at inevitable characteristic of people interested in software to ignore reliable/existing/"boring" tools and reinvent the wheel? I can see the benefit as a learning experience, but a lot of these diy efforts accidentally become popular to the detriment of better tools.
The tool certainly presents an appealing design, however I am unsure of the necessity of its interactive features.
It mixes several concerns that I would typically assign to separate applications, such as fzf and $EDITOR.
It mixes several concerns that I would typically assign to separate applications, such as fzf and $EDITOR.
In the linux and mac console (via brew) there is also swaks - a simple tool for sending e-mails.
echo "mail body" | swaks -t mail@to -s server -tls -a LOGIN -au mail_login -ap password --from from@mail --h-Subject subject --body -
and mail is send ;-)
echo "mail body" | swaks -t mail@to -s server -tls -a LOGIN -au mail_login -ap password --from from@mail --h-Subject subject --body -
and mail is send ;-)
Resend seems like it might be unnecessary and overkill. Why not just send mail through your mail provider directly? Or is this more about sending email campaigns from the CLI?
I'd love to see something like oh-my-zsh but for stuff like this, because there are a ton of day-to-day utilities I'd like to use in the terminal, but I don't have time to track them all down and configure them.
For instance, I'd love to see a good to-do list. I've tried a couple but they underwhelmed me.
For instance, I'd love to see a good to-do list. I've tried a couple but they underwhelmed me.
what's wrong with mutt? ;-)
If the purpose is learning, really cool, am sure you learned plenty.
Otherwise, there are already so many CLI mail tools, would really appreciate, if you could tell us, why use this one instead of the established ones. Thanks!
Because resend, a YC company, wants you to use their API so they created this.
What is resend and why do I need it to work with this?
I remember using 'elm' for terminal based email back in the 1990s.
you can also send mails with curl via cli https://everything.curl.dev/usingcurl/smtp
What old is new again…
Pop is a Text-based User Interface (TUI) that allows you to send emails without having to switch context from your command-line interface.
Here's why I'm obsessed with Pop:
1. You can write an email body with AI
2. You can easily install using Homebrew
3. You can do some really powerful stuff like generating a PDF and sending an invoice via email entirely from the command line
The email sending part is taken care by Resend, another developer-first product, which makes it the perfect integration for this.
As a developer, I live in the terminal. And I would love to hear how other developers feel about this. We would love to hear your ideas, experiences, and feedback.