sendEmail是一个轻量级的MTA,有了它可直接用shell脚原本发邮件,可用于crontab任务、zabbix报警各类场合,没必要搭建繁琐的邮件服务。html
# wget http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz
# tar -xzvf sendEmail-v1.56.tar.gz
# mv sendEmail /usr/local/bin/shell
发送邮件服务器
# /usr/local/bin/sendEmail -f himail@163.com -t 123456789@qq.com \
-s smtp.163.com -u "邮件主题" -o message-content-type=html \
-o message-charset=utf8 -xu himail@163.com -xp 123456 -m "邮件内容"编码
# /usr/local/bin/sendEmail -f himail@163.com -t 123456789@qq.com \
-s smtp.163.com -u "邮件主题" -o message-content-type=html \
-o message-charset=utf8 -xu himail@163.com -xp 123456 -m "邮件内容".net
命令说明:htm
/usr/local/bin/sendEmail 命令主程序
-f ttlsafrom@163.com 发件人邮箱
-s smtp.163.com 发件人邮箱的smtp服务器
-u "邮件主题" 邮件的标题
-o message-content-type=html 邮件内容的格式,html表示它是html格式
-o message-charset=utf8 邮件内容编码
-xu ttlsafrom@163.com 发件人邮箱的用户名
-xp 123456 发件人邮箱密码
-m "邮件内容" 邮件的具体内容crontab
/usr/local/bin/sendEmail 命令主程序
-f ttlsafrom@163.com 发件人邮箱
-s smtp.163.com 发件人邮箱的smtp服务器
-u "邮件主题" 邮件的标题
-o message-content-type=html 邮件内容的格式,html表示它是html格式
-o message-charset=utf8 邮件内容编码
-xu ttlsafrom@163.com 发件人邮箱的用户名
-xp 123456 发件人邮箱密码
-m "邮件内容" 邮件的具体内容get