sendmail安裝及SMTP配置
1、安裝sendmail
# yum install -y sendmail
# yum install -y sendmail-cf
2、配置發送郵件的郵箱認證信息
# vim /etc/mail.rc
在后面添加一下內容:
set from=xxxxx@xxx.com #發送者的郵箱
set smtp=smtp.exmail.qq.com #郵箱的SMTP
set smtp-auth-user=xxxxx@xxx.com #發送者的郵箱
set smtp-auth-password=***** #郵箱密碼
set smtp-auth=login #自動登錄
3、測試發送郵件
echo '郵件內容' | mail -s "郵件標題" -r xxxxx@xxx.com hhh@163.com aaa@163.com
說明:xxxxx@xxx.com為發送者郵箱,要和第二步設置郵箱一致,hhh@163.com aaa@163.com是收件人,多個收件人用空格隔開。
本文由用戶 TanishaKnol 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!