Mutt smtp

From wikinotes
Revision as of 22:27, 1 January 2021 by Will (talk | contribs) (→‎Configuration)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Mutt can send emails itself.

Configuration

Login Auth

# ~/.mutt/muttrc

set ssl_force_tls = yes
set smtp_url      = "smtps://<your_email>@smtp.gmail.com:465/"
set smtp_pass     = "`<command-to-retrieve-password`"

OAUTH2

# ~/.mutt/muttrc

set ssl_force_tls = yes
set smtp_url      = "smtps://<your_email>@smtp.gmail.com:465/"
set smtp_authenticators = "oauthbearer"
set smtp_oauth_refresh_command = 
set smtp_oauth_refresh_command="python2 ~/.mutt/scripts/oauth2.py \
  --quiet \
  --user=<youremail>@gmail.com \
  --client_id=<clientid> \
  --client_secret=<secret> \
  --refresh_token=<refresh-token>"