I'm trying to send html mail using smarthost with the following command:
cat test_mail.txt | mail -a "MIME-Version: 1.0" -a "Content-Type: text/html" -s "title" [email protected]
I have also tried using this:
mail -a "Content-type: text/html;" -s 'title' [email protected] < test_mail.txt
But it is not possible because I get this error:
MIME-Version: 1.0: No such file or directory
I'm using exim:
dpkg -S `which sendmail`
exim4-daemon-light: /usr/sbin/sendmail
My system is Ubuntu 14.04.2 LTS.
I found workaround. I installed postfix, so mail configuration is like that:
Then you can send an email using following command:
where mailheader it is file containing:
and mailbody it is file with your message.