用mutt發送html格式的郵件 轉載

用以下方法可以實現:(前提:mutt 必須在1.5版本以上,我用的1.5.21)
cat index.html |/usr/local/mutt/bin/mutt -s “test” -e ‘set content_type=“text/html”’ [email protected]

另外:mutt還可以發送帶附件的郵件
echo "this is test " |/usr/local/mutt/bin/mutt -s “test” [email protected] -a /root/extman.2.11.tar.gz

也可以指定發件人(默認是root):
使用參數 -e “my_hdr from:[email protected]

總的來說就是以下一條命令:
cat index.html |/usr/local/mutt/bin/mutt -s “test” -e “my_hdr from:[email protected]” -e ‘set content_type=“text/html”’ [email protected] -a /root/extmail-1.0.1.tar.gz

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章