文章主要是参考http://www.cnblogs.com/276815076/archive/2011/10/11/2207214.html
html
验证发送成功,请大胆尝试,但后果自负哈。ubuntu
不用说首先安装软件,ubuntu你们都知道的哈,傻瓜式sudo apt-get install mutt msmtp,一切默认设置就行。服务器
接着开始各类配置,很简单,不想麻烦,能够copy,固然我也是ctrl+c的测试
MUTT
系统全局设置/etc/Muttrc,若是使用某个系统用户,能够在~/.muttrc中设置。
vi .muttrc
set sendmail="/usr/bin/msmtp"
set use_from=yes
set realname="FengYuBin"
set from=fyb@163.com
set envelope_from=yes加密
敲入以下命令:msmtp --host=smtp.163.com --serverinfo回车spa
SMTP server at smtp.163.com (m5-86.163.com [202.108.5.86]), port 25:
163.com Anti-spam GT for Coremail System (163com[20050206])
Capabilities:
PIPELINING:
Support for command grouping for faster transmission
AUTH:
Supported authentication methods:
PLAIN LOGIN日志
到这里,你能够使用mutt来发送邮件了,咱们测试一下。
server
echo "test" |mutt -s "my_first_test" ***@gmail.comhtm
去邮箱看看是否成功!
blog