#安裝郵箱客戶端
yum -y install mailx
#配置,編輯/etc/mail.rc
set ssl-verify=ignore
set nss-config-dir=/etc/pki/nssdb
set [email protected]
#set smtp=smtps://smtp.163.com:465
set smtp=smtp.163.com
set [email protected]
set smtp-auth-password=xxxxx #改密碼爲第三方登錄使用的密碼
set smtp-auth=login
#測試:
mail -s “主題” [email protected] < test.txt
#test.txt內爲郵件內容