linux下最简发邮件

使用mail命令(yum install mailx)


配置/etc/mail.rc

set [email protected] smtp="smtp.sina.com"

set smtp-auth-user="[email protected]" smtp-auth-password="xxxx"

set smtp-auth=login


echo -e $mailContent | mail -s 'this-is-title' [email protected]


发送系统报警邮件时问是忘记,记录一下。

你可能感兴趣的:(linux下最简发邮件)