LINUX sendmail 发送HTML 邮件

linux mail命令不能指邮件头所以使用formail命令
cat htmlmail |formail -I "From: [email protected]" -I "MIME-Version:1.0" -I "Content-type:text/html;charset=gb2312" -I "Subject:test"|/usr/sbin/sendmail -oi [email protected]




发送html格工
#==收件人列表
MailList="[email protected] [email protected]"
cat html文件 | formail -I "From: 发送人" -I "To:$MailList" -I "MIME-Version:1.0" -I "Content-type:text/html;charset=zh_CN.utf-8" -I "Subject:邮件标题"|/usr/sbin/sendmail -t $MailList

你可能感兴趣的:(html,linux,sendmail)