How can i send the email using mailx command including the HTML code? for example:
mailx -s "Report" << EOF
Report Generated
<table width="600">
<tr><td width="30%"> </td><td width="35%" style="font-size:7pt;">Definition</td></tr></table>EOF
however the mail did send, but which is not as html code..
Anybody know how to send mailx including the html inside the mail body?
I havent used mailx for sending HTML but have used sendmail. You can use the following if you can use sendmail instead of mailx
(echo -e "Subject: $SUBJECT\nMIME-Version: 1.0\nFrom: $MAIL_FROM\nTo:$MAIL_TO\nContent-Type: text/html\nContent-Disposition: inline\n\n";/bin/cat $MAIL_FILE) | /usr/sbin/sendmail -f $MAIL_FROM $MAIL_TO
I tried this on Linux
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With