nmh-workers
[Top] [All Lists]

[Nmh-workers] Suggestion: using comp with mhbuild for custom mail

2004-06-09 07:30:07
I mostly use the command-line MH/nmh tools like comp, repl, etc.
A lot of us use GUI or semi-GUI interfaces instead.  I thought I'd
mention one reason I like plain old comp/repl/etc..  It lets me
make custom multipart messages in a hurry, with HTML and plain-text
parts that differ from each other.

First: if you haven't made a multipart message with comp, here's 
the main idea.  You put directives for mhbuild into the message
body.  Here's an example draft message, indented a bit for clarity:

    To: joe(_at_)foo(_dot_)bar
    Fcc: inbox
    Subject: Dinner
    ---------
    #begin alternative
    #<text/plain

    The plain-text version of the message goes here
    (it should be *first* in the message body)

    #<text/html

    <p>
    The HTML version of the message goes here
    (it should be <i>second</i> in the message body)

    #end alternative

What I usually do is to write the plain-text part first.
Then I copy it to the end of the message, inside the HTML part,
add the HTML tags that I want to use and make custom edits so
the HTML looks better.  For instance, I might show a URL like
this in the plain-text part:

    There's more information at www.foo.bar.

But, in the HTML part, I might change that line to read:

    Here's <a href="http://www.foo.bar/";>more information</a>.

Yup, mailers like Mozilla will let you compose in HTML and then
make a plain-text alternative automagically.  But they usually do
a sort of ugly job with URLs and some other text.  And a lot of
mailers make incredibly ugly HTML full of useless <DIV> tags and
etc.  Adding some quick HTML tags yourself can make cleaner mail.

FWIW...
Jerry

P.S.  After you compose the draft, if it's not converted to MIME
format automatically, from a "What now?" prompt you type: mime.
Then, if there were no errors, you get another "What now?" prompt
and you can type: send.


_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>