0

I am trying to send e-mail with HTML in the body using mailx comand.

cat "messagefile.html" | mailx -s "$client - Error report" -S smtp=smtp://mailserver:26 -S smtp-auth=login -S smtp-auth-user=USER -S smtp-auth-password=PASS -S from="USER" TOWHOM

But is sending the HTML code.

I’ve tried:

  • To add -a “Content-Type”: seams is not longer supported by my centos version. This was explained here: Mailx send html message .
  • Also I’ve tried to add the content type into the html file . Not working.
  • Content type into subject also

The HTML is correct when I view it direct from the server. Does anyone know a way to do it ?

Thank you all.

Theodor
  • 1
  • 2

0 Answers0