Skip to content

Latest commit

 

History

History
78 lines (55 loc) · 1.42 KB

msmtp.md

File metadata and controls

78 lines (55 loc) · 1.42 KB

How to mail on macOS

FIXME: something wrong


References

msmtp

An SMTP client

See man msmtp for more


Install

brew install msmtp

Config

Create file ~/.mailrc & append configs to it as below

set sendmail=/usr/local/bin/msmtp

Create file ~/.msmtprc & append configs to it as below

  • Replace PASSWORD with your real password
  • Replace [email protected] with your real email address
# Use an external SMTP server with insecure authentication.
# (manually choose an insecure authentication method.)
# Note that the password contains blanks.

defaults

####################################################################
# A sample configuration using QQMail
####################################################################

# account name is "qqmail".
# You can select this account by using "-a qqmail" in your command line.
account qqmail
host smtp.qq.com
tls on
tls_certcheck off
port 465
auth login
from [email protected]
user [email protected]
password PASSWORD

# If you don't use any "-a" parameter in your command line,
# the default account "qqmail" will be used.
account default: qqmail

Send

# e.g.
echo "CONTENT" | mailx -s "SUBJECT" [email protected],[email protected]
mail -s
# or
mail