Linux uses the Mail command to send mail-third-party SMTP

Source: Internet
Author: User
Tags auth

Yum Install mail



Modify/etc/mail.rc

Empty file Join

Set [email protected]
Smtp=smtp.163.com #smtpserver
Set smtp-auth-user=ysy399268824
smtp-auth-password= Password
Smtp-auth=login #smtp Account


Because mail commands use SendMail or postfix to send messages by default

SendMail
# Service SendMail Stop
# chkconfig SendMail off

Postfix
# service Postfix Stop
# chkconfig Postfix off

and then test

echo helloword|mail-s "Test" [email protected]


Test SMTP login can use Windows test under reference to his Weibo http://blog.sina.com.cn/s/blog_6dbfc2a901014yqx.html

Telnet smtp.163.com

Helo 163.com

Auth Login

This article is from the "Cloud Notepad" blog, please be sure to keep this source http://youngcloud.blog.51cto.com/2873694/1659244

Linux uses the Mail command to send mail-third-party SMTP

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.