Re: send HTML formatted mail (for M$ Outlook) with mailx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Thu, Oct 21, 2010 at 6:40 AM, Sven Aluoor <aluoor@xxxxxxxxx> wrote:
>
> I have here a small ksh script which generates html output and I am
> trying to send this html output as inline HTML mail for M$ Outlook
> users (not attachment).
>
> But it doesn't work, in mail you see the html source as plain text

The trouble here is that to have it properly rendered as HTML on
receipt, it has to be tagged as HTML in the *headers* of the message.
In your example, the headers are created by mailx, which is a very old
interface that doesn't know how to apply the appropriate tagging.

You may be able to fool it by doing this (note placement of newlines
is important, also removed unnecessary use of cat and subshell):

mailx -s "Test HTML output in outlook
MIME-Version: 1.0
Content-Type: text/html" sven.aluoor@xxxxxxx < /tmp/coi.html

If that doesn't work, you're going to have to avoid using mailx and
construct the message header yourself.
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux