I want to send an HTML email.
have a plain text file that looks like this:
From: "name" <[email protected]>
To: [email protected]
Subject: First Email
MIME-Version: 1.0
Content-Type: text/html; charset=us-ascii
Content-Disposition: inline
<strong>Hello, World!</strong>
I run mailx
like this,
mailx -t -S smtp=server.com [email protected] < file
It sends a plain-text email instead and prints:
Ignoring header field "MIME-Version: 1.0"
Ignoring header field "Content-Type: text/html; charset=us-ascii"
Ignoring header field "Content-Disposition: inline"
Why?
How do I send an html email?
Other sources say to use the -a
flag and specify the content-type,
but -a
on my version of mailx
is attachment; so that doesn't work.