How to send HTML email using linux command line

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

    I found a really easy solution: add to the mail command the modifier -aContent-Type:text/html.

    In your case would be:

    mail -aContent-Type:text/html -s "Built notification" address@example.com < /var/www/report.csv
    

提交回复
热议问题