How to send HTML email using linux command line

前端 未结 11 2067
无人共我
无人共我 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:41

    My version of mail does not have --append and it too smart for the echo -e \n-trick (it simply replaces \n with space). It does, however, have -a:

    mail -a "Content-type: text/html" -s "Built notification" address@example.com < /var/www/report.html
    

提交回复
热议问题