首页 > 系统服务 > 详细

macOS下用命令行发邮件

时间:2017-04-01 00:49:33      阅读:1016      评论:0      收藏:0      [点我收藏+]
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 vincenthandsome@sina.cn
auth login
tls off
user vincenthandsome@sina.cn
password 2wsxzaq1
:wq!

chmod 600 ~/.msmtprc
echo "this‘s an apple." |mail 888888@qq.com
上述方法参考自https://my.oschina.net/uhziel/blog/186683

 

macOS下用命令行发邮件

原文:http://www.cnblogs.com/vincent-liang/p/6654189.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!