You are not logged in.

#1 2011-06-23 17:02:43

efleming969
Member
Registered: 2007-03-14
Posts: 39

mailx content-type header

I can't seem to find any information on setting additional headers (specifically Content-Type) when sending a message via mailx

I can send text/plain messages, but I need to send text/html content.

cat test.html | mailx -s "Testing" some@mail.com

I've tried including headers at the top of my file, but mailx just ignores them.

cat test.html | mailx -t 
To:some@mail.com
Subject: Testing
Content-Type: text/html; charset=ISO-8859-1

<html></html>

Any advise or links to how this can be achieved would be great.  Thanks

Offline

#2 2011-06-24 18:29:53

efleming969
Member
Registered: 2007-03-14
Posts: 39

Re: mailx content-type header

I found this question on stackexchange and decided mailx does not meet my needs very well, so I installed msmtp.  It's very easy to setup and use.  I added the necessary headers to the top of my file, then executed:

cat test.html | mstp some@mail.com

Offline

Board footer

Powered by FluxBB