1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| wget http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz tar -zxvf sendEmail-v1.56.tar.gz cp -a sendEmail-v1.56/sendEmail /usr/local/bin/ chmod +x /usr/local/bin/sendEmail
wait $! email_reciver="xxx@qq.com"
email_sender=xxx@163.com
email_username=xxx@163.com
email_password=123qwe file1_path=${Nginx_logs}${Log_Name}_${before_yesterday}.log.gz
email_smtphost=smtp.163.com email_title="日志"-${Log_Name}_${before_yesterday}.log.gz email_content=${file1_path}
/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 ${file1_path} ${file2_path} -o message-charset=utf-8
|