I'm trying to send an HTML email from our CentOS server to users. In the long run I'll be building a COBOL program that runs the command to send reports to the user.
Here are a few details.
- CentOS 6.4
- MAU : Mailx
- MTA : Postfix 2.6.6
- Postfix is running a relay through an exchange server.
As for what commands I've tried running. The one I've seen the most today has been the following.
$ mailx -a 'Content-Type: text/html' -s "Command Line Test" andyv@example.com < ./bodytext.html
After running the shown command, I get an error saying "Content-Type: text/html: No such file or directory". I'm pretty sure that after a certain update they stopped allowing -a as a flag for Content-Type designation.
I've also tried adding the 'Content-Type: text/html' to the actual bodytext.html file as the very first line. I'm kind of just at a loss for what I can do to send the HTML email. Some of the sources I've found say that mailx and postfix can't properly send HTML emails. Hopefully that's not the case, but if it is than I'd like to know what your take on other MAU and MTA technologies?
bsd-mailx
andmailx
provided by CentOS (Heirloom mailx as mentioned in your linked post). You need to read all the posts and manual pages on your system, since they might use different version then other people refer. – Jakuje Feb 17 '16 at 22:29mailx
content type as described in the linked question, even if it is quite ugly for Heirloom one. I certainly didn't want you to discourage you, from asking questions. The mess between Unix/Linux/BSD/whatever tool might be confusing even if they are called the same way. – Jakuje Feb 17 '16 at 23:06