Sending HTML mail using a shell script

前端 未结 13 1447
死守一世寂寞
死守一世寂寞 2020-11-28 03:46

How can I send an HTML email using a shell script?

13条回答
  •  [愿得一人]
    2020-11-28 04:28

    So far I have found two quick ways in cmd linux

    1. Use old school mail

    mail -s "$(echo -e "This is Subject\nContent-Type: text/html")" test@yahoo.com < mytest.html

    1. Use mutt

    mutt -e "my_hdr Content-Type: text/html" test@yahoo.com -s "subject" < mytest.html

提交回复
热议问题