Linux Shell脚本发送邮件

来源:互联网 发布:mac系统10.31 编辑:程序博客网 时间:2024/06/06 18:30

发送邮件脚本

#shell send emailfrom_name="test@test.org"from="test@test.com"to="nick@test.com"cc_name="AAA"cc="AAA@test.com"email_title="test@test.org"email_content="/home/file_log.log"email_subject="[Testing]"echo -e "To: \"${email_title}\" <${to}>\nCc: \"${cc_name}\" <${cc}>\nFrom: \"${from_name}\" <${from}>\nSubject: ${email_subject}\n\n`cat ${email_content}`" | /usr/sbin/sendmail -t


0 0
原创粉丝点击