$book = '..'?>
include "$book/mh.php"; includeHeader('mmbwm.html', 'verfor.html'); ?>The messages you send with comp don't need to have fields like cc: and Subject: in the headers. As long as you have To:, your message should get there. (The other header fields should follow rules in RFC 822.)
For instance, here's a program that receptionists might want. It uses prompter to take phone and other messages, then sends them via email. This version of comp is called msg.
The date, time, and person who took the message are added automatically by MH. The draft template file uses Fcc: to automatically keep a copy of all messages sent. msg is nice for messages to busy people who aren't at their desks but are close to terminals -- or who can't check their mailboxes for slips of paper -- or who want to track their messages electronically.
The messages look something like this:
% show ... Date: Mon, 09 Jan 1995 12:34:56 PST From: receptionist's username To: loisl Subject: While You Were Out... X-Person: Betty Smith X-Of: Kumquat Associates X-Phone: (619)234-5678 X-Called: x X-Please_call: x -------- About your new cheese straightener.To make msg, follow these steps:
To: Fcc: msgs Subject: While You Were Out... X-URGENT: X-Person: X-Of: X-Phone: X-Called: X-Came_to_see_you: X-Wants_to_see_you: X-Please_call: X-Will_call: X-Returned_your_call: --------As prompter shows each empty field from that file, the receptionist can either fill it in with a name or number, type x after it (to just include the field in the message), or leave it blank (and prompter will delete the field). This is a handy way to use prompter.
Add this entry to your MH profile, or add the arguments to your alias or function:
msg: -form msgcomps -editor prompter
#! /bin/sh msgs=`pick -list -subject "While You Were Out"` || exit for msg in $msgs do show $msg # If the echo command prints: "-n q quits...", then remove the "#" # character from the first line below and add it to the next line: # echo "q quits, r removes, anything else continues: \c" echo -n "q quits, r removes, anything else continues: " read ans case "$ans" in q) break ;; r) rmm $msg ;; esac done(You can also get that script from this book's online archive. It's at examples/mh/bin/getmsgs.) UNIX has two versions of the echo command. The getmsgs script can be set up for either version. The comments in the script explain what to do. See the Chapter Introduction to UNIX Programming with MH for help with shell programming.
To: joeb_msgsOther users can send Joe's phone messages to his special address, even if they don't use the msg program. Then it will be easy for Joe to find his messages with MH tools like pick:
% pick -to joeb_msgs ...You could make a little shell alias or shell program named something like showmsgs that does this:
show `pick -to ${USER}_msgs -list`The Section Passing Message Numbers with Backquotes and the Chapter Introduction to UNIX Programming with MH have hints.