How to send HTML email using linux command line

前端 未结 11 2075
无人共我
无人共我 2020-11-28 04:29

I need to send email with html format. I have only linux command line and command \"mail\".

Currently have used:

echo \"To: address@example.com\" >         


        
11条回答
  •  孤城傲影
    2020-11-28 04:34

    This worked for me:

    echo "HTML Message goes here" | mail -s "$(echo -e "This is the subject\nContent-Type: text/html")" foo@example.com
    

提交回复
热议问题