centos使用gmail发送邮件

前端之家收集整理的这篇文章主要介绍了centos使用gmail发送邮件前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

Installing mailx

yum -y update
yum install -y mailx

We can now start sending e-mails using

create a symbolic link

ln -s /bin/mailx /bin/email

###Set an External SMTP Server to Relay E-Mails

vi /etc/mail.rc

edit

set smtp=smtps://smtp.gmail.com:465
set smtp-auth=login
set smtp-auth-user=USERNAME@YOURDOMAIN.COM
set smtp-auth-password=YOURPASSWORD
set ssl-verify=ignore
set nss-config-dir=/etc/pki/nssdb/

send email

example usage :

echo "Your message" | mail -v -s "Message Subject" email@address
原文链接:https://www.f2er.com/centos/376085.html

猜你在找的CentOS相关文章