mail command and html

Patrick O'Callaghan pocallaghan at gmail.com
Thu Nov 27 17:28:29 UTC 2008


On Thu, 2008-11-27 at 18:07 +0100, Guillaume wrote:
> 2008/11/27 Patrick O'Callaghan <pocallaghan at gmail.com>:
> > On Thu, 2008-11-27 at 16:59 +0100, Guillaume wrote:
> >> hi,
> >>
> >>
> >> I would like to send a html mail from console with the  `mail`
> >> utility. I try this :
> >>    cat html.file |mail -s subject recipient at somewhere.domain
> >> I try to had some header in the htlm.file but it does not work too.
> >
> > You need to say what you mean by "does not work".
> Ok sorry !
> 
> When i send email with simple command like
>     $cat html.file |mail -s subject recipient at somewhere.domain
> the mail arrive to recipient but is not read as HTML. In the mail
> reader the html tag appear in "clear" and text is not formatted...
> Of course, the file i use is well formated in html language.

You need to set up the MIME headers to indicate that it's HTML. I don't
know if 'mail' can do this directly, but try 'sendEmail' (from
http://caspian.dotconf.net/) which has an option for this.

poc




More information about the fedora-list mailing list