The article mainly refers to the reference http://www.cnblogs.com/276815076/archive/2011/10/11/2207214.html
Verify send success, please try boldly, but the consequences of the ego ha.
Needless to say first install software, Ubuntu everybody knows ha, the fool type sudo apt-get install mutt msmtp, all default settings on the line.
Then start a variety of configuration, very simple, do not want to trouble, you can copy, of course, I also CTRL + C
MUTT
System Global Settings/etc/muttrc, if you are using a system user, you can set it in ~/.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
Create ~/.MSMTPRC and ~/.msmtp.log, respectively, for configuration and log files.
VI. MSMTPRC
Account Default
Host smtp.163.com from fyb@163.com
Auth Plain user fyb password 123456 logfile ~/.msmtp.log because the password is plaintext, we need to modify the permissions for this file.
chmod MSMTPRC Touch ~/.msmtp.log View whether the SMTP server supports authenticated TLS encryption:
Typing the following command: MSMTP--host=smtp.163.com--serverinfo Carriage return
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
Here, you can use Mutt to send mail, let's test it.
echo "Test" |mutt-s "my_first_test" * * * * @gmail. com
Go to the mailbox and see if it works.