Linux Send mail Specify sender

Source: Internet
Author: User

When sending a message using the Mail command, the default sender is the local user root or other

Specify an email sender by modifying the/etc/mail.rc file

Use an external SMTP server (163, 126, etc.) to send mail;

Add the sender's mailbox authentication information to the/etc/mail.rc file:

Vi/etc/mail.rc

Set [email protected]

Set smtp=smtp.163.com
Set Smtp-auth-user=zrer90
Set SMTP-AUTH-PASSWORD=PASSWD
Set Smtp-auth=login

To send a message:

echo "Test using [email protected] to send email" | Mail-s "This e-mail from Linux" [email protected]

To view messages:

650) this.width=650; "title=" QQ picture 20140624141757.jpg "alt=" wkiol1opgrnc0mmyaaf0myyqxvq434.jpg "src="/http S3.51cto.com/wyfs02/m01/30/9d/wkiol1opgrnc0mmyaaf0myyqxvq434.jpg "/>

650) this.width=650; "title=" 123.png "alt=" wkiol1opgyndjysdaacl-8a0h-i938.jpg "src=" http://s3.51cto.com/wyfs02/M00 /30/9d/wkiol1opgyndjysdaacl-8a0h-i938.jpg "/>

 

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.