This section explains xmh features you'll use to compose and send mail. The drafts can be composed in a main window or a composition window. You can work on more than one draft at the same time, store them, and come back some time later or make a "form letter" draft that you use over and over.
Making a New Draft with Compose Message
If you're using the master xmh window or other main windows like it, you can select Compose Message on the Message menu -- a composition window will open for your new draft message. Or, if you're already working in a composition window and you click the Compose Message button at the bottom, it will make another composition window. You can work on several different drafts at once. For instance, in the Figure below I have two composition windows open. I'm clicking the Compose Message button on the drafts:1 window to open a third composition window.
Figure: Working on several drafts at once
Each time you use Compose Message, xmh automatically creates an empty draft file in the drafts folder. If your draft folder is empty, the first draft you create will be message number 1 in the folder. A message-composition window will open onto that draft; the titlebar will say drafts:1. You can click the Send button to send that draft message right away or you can click Save Message and then Close Window. If you save without sending, the draft file stays in the drafts folder for you to finish later.
If you start a second draft before you've sent the first, that draft will be number 2 (unless there's already a message 2 in the draft folder). An editor window will open onto that draft; the titlebar will say drafts:2. From here, as you did before, you can send or save the message.
A composition window's titlebar will be marked [Temporary] unless the message has been saved at least once. See the Figure above.
Re-editing an Existing Draft
There are at least two ways you can work on a draft that you saved a while ago:
Then, select a draft message from the list of messages: either click on it in the Table of Contents or make it the current message by displaying it. Finally, select Use as Composition on the Message menu -- and be sure to use the Message menu on the window that's showing the drafts folder.
After you move this composition window (if you want to), your screen will look something like the Figure below.
Figure: Recomposing a draft from a second main window
If you are viewing the draft message in a view window (Section View Window), you can also click Use as Composition in the buttonbox at the bottom of the window.
After you save a draft once, it will stay in the drafts folder even after you send it. This is a nice way to make "form letters" that you send every so often -- you can change a few details of the draft, send it... then come back later, change some parts, send it again...
If you've saved the draft at least once, remember to delete it when you're done.
For more information, see the Section Template Draft Files Set Headers.
Parts of the Section Formatting Forwarded Messages explain changes you can make to the ways that messages are forwarded.
Because xmh runs the MH repl command to build the draft message before it opens the composition window, some repl: switches in your MH profile will affect the draft you get. For example, an entry such as the following:
repl: -filter replfiltincludes the original message in your reply, formatted through the replfilt filter file. See the Section Including the Original Message with -filter.
Some switches can cause trouble. For example, using the repl -query switch in your MH profile will "freeze" xmh. The best answer is probably to use a separate MH profile for xmh. The Section Conflicts Between xmh and MH Customization explains how.
MH profile switches that aren't used to build the draft message won't affect xmh replies, though. For example, the -annotate switch, which asks the MH repl command to annotate the original message with a Replied: field in the header, won't work under xmh.
To do this, use the Use as Composition command on the Message or View menus. (Or click the Use as Composition button at the bottom of a view window.) It copies the message into the drafts folder and opens a composition window. (Note that Messages already in the drafts folder aren't copied to it.)
For example, in the Figure below the bad parts of a bounced mail message are being deleted by selecting the region (shown in inverse video) and pressing CTRL-W to kill the region. The To: address field has been fixed (the hostname was wrong). Don't forget to delete any End of Unsent Draft line at the end. Clicking the Send button will send the fixed-up draft.
Figure: Resending a returned message with Use As Composition
To: email@example.com, uunet!abo!pxu341i, firstname.lastname@example.org could type the name of your alias that stands for those addresses:
To: projectYou have to maintain the aliases from a shell window or editor window instead of an xmh window. But once you're set up, you can use aliases from an xmh composition window just as you'd use any other address. For details, see the Section MH Aliases.
[Table of Contents] [Index] [Previous: Chapter Introduction: Using xmh] [Next: Scrollbars]
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 <email@example.com>