Mailx send html message [duplicate]

It’s easy, if your mailx command supports the -a (append header) option: $ mailx -a ‘Content-Type: text/html’ -s “my subject” [email protected] < email.html If it doesn’t, try using sendmail: # create a header file $ cat mailheader To: [email protected] Subject: my subject Content-Type: text/html # send $ cat mailheader email.html | sendmail -t