On CentOS:
The first step: Open the POP3/SMTP service in the QQ mailbox set-up account and set up a separate password
Step two: Yum install-y mailx
Step Three: Vim/etc/mail.rc add your mailbox information at the end of the file:
Set [email protected]
Set smtp=smtp.qq.com
Set smtp-auth-user=82312924
Set Smtp-auth-password=your password
Set Smtp-auth-login
Fourth step: You can directly use the echo "body" |mail-s "theme" [email protected]
On Ubuntu:
Ubunut on MAILX This command corresponds to the Deb package with BSD-MAILX and HEIRLOOM-MAILX
BSD-MAILX corresponding configuration file is/etc/mail.rc with CentOS, but after configuring the authentication information can not send mail, the specific reason I did not find ...
HEIRLOOM-MAILX the corresponding configuration file is /etc/nail.rc.
The configuration process is as follows:
The first step: Open the POP3/SMTP service in the QQ mailbox set-up account and set up a separate password
Step Two: Apt-get install HEIRLOOM-MAILX
Step Three: Vim/etc/nail.rc add your mailbox information at the end of the file:
Set [email protected]
Set smtp=smtp.qq.com
Set smtp-auth-user=82312924
Set Smtp-auth-password=your password
Set Smtp-auth-login
Fourth step: You can directly use the echo "body" |mail-s "theme" [email protected]
This article is from the "follow-up" blog, please be sure to keep this source http://comingon.blog.51cto.com/4870913/1608506
Use external SMTP to send mail under Ubuntu and CentOS