Examples of external programs

1- Mail

Default mode - delivery setting

By default, when the Mailto program setting is left empty, MMM uses mail to deliver a message. However, if the environment variale MMM_MAIL is set, MMM uses it as the delivery command. The calling convention is :
command -s <subject> <address>
and the command receives the body of the message in its standard input.

ELM

Use xterm -e elm in the Mailto program setting.

MH and exmh

It's a bit more complex. I use the following setup:
A shell script named compmail, given in the Mailto program setting :

SUBJECT=
TO=

# Parse command line
while test $# -gt 0; do
  case $1 in 
    -s) shift; SUBJECT=$1;;
     *) TO=$1; shift;;
  esac
done

# Prepare the template
draft=`mhpath +drafts new`
/lib/cpp -P -DTO="$TO" -DSUBJECT="$SUBJECT" \
    $HOME/Mail/components.template > $draft

# Set cur for -use
folder +drafts `basename $draft`

# If only plain MH is used:
# exec xterm -e comp use
# If exmh is used
exec wish << wish_eof
    wm withdraw .
    send exmh Msg_Compose -use
    exit 0
wish_eof
A file components.template, to copy to ~/Mail
similar to MH's components file, except for the occurrences of TO and SUBJECT:
To: TO
cc:
Subject: SUBJECT
--------

2- Hotlist

Simple script

A simple hotlist command would be:
#!/bin/sh
echo "<A HREF=\"$1\">$2</A><BR>" >> $HOME/.hotlist.html
Then, define this file as your home page, by adding to your environement:
WWW_HOME=$HOME/.hotlist.html
export WWW_HOME
Then, activate Home to see your hotlist, and Reload to update it.

Surfboard

Jun Furuse offers a hotlist manager named Surfboard, consisting in two programs: surfboard and surfboard_remote. To be used with MMM, surfboard should be run separately, and you should give surfboard_remote as Hotlist command setting. Moreover, you should run mmm with the -external option so that surfboard can remote control MMM (ie. ask MMM to display one of the hotlist's documents).

Printing

I recommend the excellent html2ps, in its 1.0b1 version (or newer if available). A possible setting is :
html2ps -n -D -b $URL > /tmp/$$.ps && gv /tmp/$$.ps && rm /tmp/$$.ps
Instead of directly printing the result of html2ps, we go through a Postscript viewer (here gv, but it could be ghostview). The temporary file trick is there to facilitate further previewing in gv.