The command that sends your messages is called send. When you type s or send at a What now? prompt, the send program is executed. If you type p or push at the What now? prompt, send -push is run instead.
Here's a version of send called push. (This idea came from the Marshall Rose examples in the MH distribution, the miscellany/mtrenv directory.)
If you replace the whatnow program with push, it will send your draft message as soon as the interface you're using (like repl) starts the whatnowproc. This means that prompter, or any other editor, won't run at all. So you can't use push with commands like comp which need an editor to fill in the draft. It's useful, however, for programs like thanks that send "canned" messages, because you won't have to wait for a What now? prompt: your message is sent right away.
By the way, if you don't have a draft folder set up (the Section Draft Folder), you might do that before you use push.
push: -push -alias aliasfile draft_option_hereThe send command will ask you questions like this:
Use "/yourMHdir/draft"?unless you add a -draft switch ahead of time, which will keep it quiet. If you are using a draft folder, replace draft_option_here with -draftfolder +drafts (where drafts is the name of your draft folder). Otherwise, replace it with -draft.
thanks: -form thankscomps -editor cat -query -whatnowproc pushUsing a different -whatnowproc than the default whatnow does more than just skip the What now? prompt. The thanks command (which, remember, is really a version of repl) first builds the draft message. Then, instead of passing the draft to whatnow, the thanks program passes the draft to push.
This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. It 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 COPYING.
Copyright © 1991, 1992, 1995 O'Reilly Media, Inc.
Last modified: 2006-05-31 15:13:43 -0700