[英]/usr/sbin/sendmail to send mail with attachemnt of .html
我正在使用/usr/sbin/sendmail
發送帶有.html附件的郵件
您能告訴我們正確的命令嗎?
(cat report.html) | /usr/sbin/sendmail $MAILTO
sendmail
期望消息為“原始”格式(標頭+空行+正文)。
生成將郵件正文指定為html的MIME標頭。 例如,請參見下面的shell腳本。
#!/bin/sh
MAILTO=john.doe@example.com
cat - report.html << END | /usr/sbin/sendmail -i -- $MAILTO
MIME-Version: 1.0
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit
Subject: Report
To: $MAILTO
END
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.