How send html mail using linux command line
Posted
by Diesel Draft
on Stack Overflow
See other posts from Stack Overflow
or by Diesel Draft
Published on 2010-04-07T10:53:46Z
Indexed on
2010/04/07
12:13 UTC
Read the original article
Hit count: 236
Hi,
I need send mail with html format. I have only linux comand line and command "mail".
Currently have used:
echo "To: [email protected]" > /var/www/report.csv
echo "Subject: Subject" >> /var/www/report.csv
echo "Content-Type: text/html; charset=\"us-ascii\"" >> /var/www/report.csv
echo "<html>" >> /var/www/report.csv
mysql -u ***** -p***** -H -e "select * from users LIMIT 20" dev >> /var/www/report.csv
echo "</html>" >> /var/www/report.csv
mail -s "Built notification" [email protected] < /var/www/report.csv
But in my mail-agent i get only plain/text.
© Stack Overflow or respective owner