First check the system has no mail service, the general system is installed by default.
Take CentOS for example:
[Email protected]/]# Rpm-qa |grep mailmailx-12.4-8.el6_6.x86_64
Installed there, we now modify the mail configuration file:
[Email protected]/]# vim/etc/mail.rc
Add something to the last side:
Set [email protected] smtp=smtp.163.com #发送邮件的邮箱地址和转发邮件的地址, here my mailbox is: [email protected] mail forwarding address is 163 smtp.163.com (each vendor's Mail forwarding address is not the same) set [email protected] smtp-auth-password=************** Smtp-auth=login # #输入用户名和密码验证 This username and password is the password authentication that is turned on on the 163 mailbox website. Note is not your mailbox password, is the SMTP authentication password, this password needs to be opened on 163 mailbox website.
This completes the configuration and then sends the message test:
The format is: the content of the echo message |mail-s the title to whom
Echo ' message content: Test mail ' |mail-s email title [Email protected]
This article is from the "longing for Technology small white" blog, please make sure to keep this source http://lesliecheung.blog.51cto.com/12622169/1972821
Linux Mail sending