Sending mail with Emacs and msmtp
- Anmelden oder Registrieren um Kommentare zu schreiben
I'm having difficulties sending mail with msmtp and Emacs.
I installed several packages.
sudo apt install notmuch isync afew msmtp maildir-utils
Configs attached. "config" is my msmtp config.
When I do C-x m in Emacs, I get a buffer that looks like this:
To:
Subject:
From: Caleb Herbert
--text follows this line--
It should show my actual email address.
--
Thanks,
Caleb
Configs attached.
I see no attachment.
Sorry. I guess the mailing list interface did not take my email attachments.
I do not know the correct path to the SSL certs.
Currently, C-x m looks like this.
To:
Subject:
From: Caleb Herbert [less-than] caleb [at] bender.i-did-not-set--mail-host-address--so-tickle-me [greater-than]
--text follows this line--
Configs attached.
Anhang | Größe |
---|---|
dot-emacs.txt | 469 Bytes |
dot-mbsyncrc.txt | 709 Bytes |
dot-msmtprc.txt | 341 Bytes |
Does msmtp successfully send mail from the terminal?
Sorry, how do I do that?
According to https://manpages.ubuntu.com/manpages/focal/man1/msmtp.1.html (I do not have msmtp installed):
Sendmail mode (default):
msmtp [option...] [--] recipient...
(...)
In the default sendmail mode, msmtp reads a mail from standard input and sends it to an
SMTP server for delivery.
So, I would try (substituting "recipient" with an email address):
$ echo banana | msmtp recipient
Made some changes to my mysmtprc. It sends from the command line now. Screenshot attached.
C-x m in Emacs still has the wrong From line. Screenshot attached.
Anhang | Größe |
---|---|
dot-msmtprc.txt | 374 Bytes |
Given what is written there, you obviously need to set mail-host-address (does it tickle?). On https://pagefault.se/post/email-in-emacs/#sending-emails eric sets some other variables too.
Good news!
The mail sends from Emacs!
But the From says caleb at bluehome dot net rather than csh at bluehome dot net.
Anhang | Größe |
---|---|
dot-emacs.txt | 753 Bytes |
Set "user-mail-address" (with 2 Ds) instead of "user-mail-adress" (with 1 D). That should do it, according to https://www.gnu.org/software/emacs/manual/html_node/emacs/Mail-Headers.html
Oh, I didn't see that. It all works now! Thanks!
- Anmelden oder Registrieren um Kommentare zu schreiben