shell脚本sendEmail

2017-02-24  本文已影响79人  yellow_hll

sendEmail的主页http://caspian.dotconf.net/menu/Software/SendEmail/
下载地址http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz

tar –zxvf sendEmail-v1.56.tar.gz

cd sendEmail-v1.56

cp sendEmail /usr/local/bin


!/bin/bash

/usr/bin/lua /home/debug/toolscript/shengyu/decodelog.lua > /dev/null
sleep 10

收件者邮箱

email_reciver="huanglinglin@myhexin.com shengyu@myhexin.com loufu@myhexin.com smm@myhexin.com zhangqianli@myhexin.com wushengrui@myhexin.com denglinkun@myhexin.com"

发送者邮箱

email_sender="huanglinglin@myhexin.com"

邮箱用户名

email_username="huanglinglin@myhexin.com"

邮箱密码

email_password="Hll952289652"

file1_path="/home/debug/toolscript/shengyu/repairdata_date +%Y%m%d.log"

file2_path="/home/debug/toolscript/shengyu/repairdata_date +%Y%m%d.xlsx"

smtp服务器地址

email_smtphost="mail.myhexin.com"

email_title="repairdata模块的每日统计日志"
email_content="大家好,附件是repairdata模块的每日统计日志。"

/usr/local/bin/sendEmail -f ${email_sender} -t ${email_reciver} -s ${email_smtphost} -u ${email_title} -xu ${email_username} -xp ${email_password} -m ${email_content} -a ${file2_path} -o message-charset=BK

上一篇下一篇

猜你喜欢

热点阅读