Subject: Re: Trying to Create HTML e-mail on Unix

From: Simon C Banks <[email-masked]>
Date: Mon, 20 Jan 1997 10:13:34 +0000

Tom Hilbig wrote:
> 
> I have some batch jobs that create reports on Unix and automatically mail
> them to several people (just using mailx).  However, the content is plain
> text and I would like to format it using HTML instead.  Can someone tell
> me now to tell mailx (or elm, or pine) to interpret the text as
> Content-type:text/html so the receiving client (Netscape Mail in my case)
> will interpret the information properly.  What are the command line
> options to do this?

for binmail (/usr/bin/mail)

	-s "Subject of mail"

Just about covers it.

	So /usr/bin/mail -s "A report" dest@email < report.001.txt

will email dest@email with report.001.txt with a subject header of
"A report".

If you wanna set the From header then your probably better off
dricing sendmail direct which is another kettle of fish.

-- 
------------------------------------------------------------------
|           Where ignorance is bliss, wisdom is folly            |
------------------------------------------------------------------
|   Name:    Simon Banks (Si++)    Address:    Cellnet Ltd       |
|   Tel:     01-753-564225                     CSC Building      |
|   Fax:     01-753-564066                     Brunel Way        |
|   Mobile:  0850-980694                       Slough            |
|   Home:    NaN                               SL1 1XL           |
------------------------------------------------------------------

---

From: [email-masked] (Carl S. Gutekunst)
Date: 23 Jan 1997 21:39:52 GMT

In article <[email-masked]>,
Tom Hilbig <[email-masked]> wrote:
>Can someone tell me now to tell mailx (or elm, or pine) to interpret the text
>as Content-type:text/html so the receiving client (Netscape Mail in my case) 
>will interpret the information properly.

No can do with mailx -- it's not MIME aware, and won't set the MIME headers
that are needed by the received client.  Elm and Pine are both MIME mailers,
but I don't think either has a command-line interface -- someone literate in
those could tell you.

You really have three choices:

· Talk to sendmail directly. This means generating all the headers yourself.
  Not advised, but this is the real hacker's way to go.

· Get a copy of metamail 2.7, and use that to compose the message, which is
  then piped to sendmail.  This is lightweight, simple, and fairly idiot proof
  software, but rather primitive.

· Get a copy of MH 6.8.3.  This is a full-featured command-line-based mail
  client, which may be more than you wish to chew off, but it will give you
  the most flexability with the least hackery.

<csg>