My SMTP configuration (sendmail.el
)
(with-eval-after-load 'sendmail
(setq send-mail-function #'smtpmail-send-it))
(with-eval-after-load 'smtpmail
(let ((server "smtp.fastmail.com"))
(setq smtpmail-smtp-server server
smtpmail-servers-requiring-authorization (regexp-quote server)
smtpmail-smtp-service 465
smtpmail-stream-type 'ssl)))
Put the SMTP credentials to the ~/.authinfo.gpg
file:
echo \
machine smtp.fastmail.com \
login rudolf@adamkovic.org \
password "$(pass fastmail+mail)" \
| gpg \
--batch \
--encrypt \
--recipient rudolf@adamkovic.org \
--trust-model always \
--output ~/.authinfo.gpg