Monday, July 16, 2018

How to send HTML email using linux command line

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" > /var/www/report.csv
echo "Subject: Subject" >> /var/www/report.csv
echo "Content-Type: text/html; charset=\"us-ascii\"" >> /var/www/report.csv

echo "" >> /var/www/report.csv

mysql -u ***** -p***** -H -e "select * from users LIMIT 20" dev >> /var/www/report.csv
echo "" >> /var/www/report.csv

mail -s "Built notification" address@example.com < /var/www/report.csv


But in my mail-agent i get only plain/text.



alt text

No comments:

Post a Comment

plot explanation - Why did Peaches&#39; mom hang on the tree? - Movies &amp; TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...