Use external SMTP to send mail under Ubuntu and CentOS

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.