MH & nmh: Email for Users & Programmers

May, 2006

Forwarding Messages: forw

If you need to send a copy of a mail message to someone, you can forward it. To forward the current message, just type:

    % forw
To forward other messages, use the message numbers too. For example, to forward messages 3 and 5:
    % forw 3 5
    To: somebody
    cc: somebodyelse
    Subject: Messages I got about meeting tomorrow

    ----- Enter initial text

    Dear somebody, here's some mail I got.  I think you might
    want a copy of these.  The second message is the most
    important, blah blah blah...


    ----- Forwarded messages

        ...Contents of message 3 here...

    ----- Message 2

        ...Contents of message 5 here...

    ----- End of Forwarded Messages

    What now? push
Before it copies the messages you're forwarding, forw will prompt you on the screen (this doesn't go into the message) to enter any text ("initial text") you want to send along. (Note that, although this is what seems to be happening, there's more going on "behind the scenes.") You can type initial text here and then press CTRL-D at the start of a new line. Or, type CTRL-D right away to go straight to the What now? prompt, where you'll have the usual choices.

On the other hand, if you want to add a note after the forwarded messages or edit the forwarded messages themselves, use the edit command to go into the draft message with your favorite editor. You can also configure MH to let you put the note after the forwarded messages without going into an editor by using the prompter -noprepend switch.

The previous example showed a new way to send a message: the push command. The message is sent "in the background." On computers where send is slow, push gives you another prompt right away; you can do something else while MH is sending the message. That has a lot of advantages, but a few disadvantages. The Section push (or p) is worth reading before you use push again.

As most MH commands do, forw has several other features. Like repl, you can annotate the messages you forward (with -annotate. You can also reformat the forwarded messages to delete useless fields in the header or neaten the body.