msg: `While You Were Out' Messages with comp

[previous] [next] [table of contents] [index]

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:
  1. Make a file named msgcomps in your MH directory, like the one below. (You can also get this file from the book's online archive. It's in download/split/mh/Mail/msgcomps.)
    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.
  2. To make msg as a version of comp, see the Section Making a New Command Version. Or, to make an alias or function, see the Section Writing Command Versions as Aliases or Functions.

    Add this entry to your MH profile, or add the arguments to your alias or function:

    msg: -form msgcomps -editor prompter
    
  3. If you want to use the Fcc: msgs field to keep copies of messages, as shown above, you might also want to add an at(1) or cron(8) job to clean up old messages. The Section Cleaning Up Old Messages shows the setup.
  4. Some users don't want their phone messages mixed in with their other email. If that's true, try one of these ideas:

[Table of Contents] [Index] [Previous: Make Message Bookmarks with mark] [Next: Versions of forw]


Revised by Jerry Peek. Last change $Date: 1999/10/10 05:14:05 $

This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. Copyright © 1991, 1992, 1995 by O'Reilly & Associates, Inc. This file is freely available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.

Suggestions are welcome: Jerry Peek <jpeek@jpeek.com>