brew install msmtp vi ~/.mailrc set sendmail=/usr/local/bin/msmtp wq! vi ~/.msmtprc # 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 sina.cn #################################################################### account default host smtp.sina.cn port 25 from [email protected] auth login tls off user [email protected] password 2wsxzaq1 :wq! chmod 600 ~/.msmtprc
echo "this‘s an apple." |mail 888888@qq.com
上述方法参考自https://my.oschina.net/uhziel/blog/186683
时间: 2024-10-10 19:09:49