Sending Mail

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

Note: HTML conversion may not be complete.

You can send a mail message in several ways. You can call M-x mh-smail directly, either within Emacs or from the command line like:

% emacs -f mh-smail
From within mh-e's MH-Folder mode, other methods of sending mail are available as well:
Command|  Description
_______|___________________________________________
m      |  Compose a message
r      |  Reply to a message
f      |  Forward message(s)
M-d    |  Redistribute a message
M-e    |  Edit a message that was bounced by mailer
M-a    |  Edit a message to send it again
_______|___________________________________________
From within a MH-Folder buffer, you can simply use the command m. However you do it, you are prompted for the To:, cc:, and Subject: header fields. Once you've specified the recipients and subject, your message appears in an Emacs buffer whose mode is MH-Letter (see the Figure mh-e message composition window to see what the buffer looks like). MH-Letter mode allows you to edit your message, to check the validity of the recipients, to insert other messages into your message, and to send the message. We'll go more into depth about editing a draft (a message you're composing) in just a moment. (I highly recommend that you use a draft folder so that you can edit several drafts in parallel. The Section Draft Folder tells how you can create one.)

mh-smail always creates a two-window layout with the current buffer on top and the draft on the bottom. If you would rather preserve the window layout, use M-x mh-smail-other-window.

Replying to Mail

To compose a reply to a message, use the r command. If you supply a prefix argument (as in C-u r), the message you are replying to is inserted in your reply after having first been run through mhl(1) with the format file mhl.reply. The Section mhl explains how you can modify the default mhl.reply file.

When you reply to a message, you are first prompted with Reply to whom?. You have several choices here.

Response|  Reply Goes To
________|____________________________________________________
from    |  The person who sent the message. This is  the  de-
        |  fault, so RET is sufficient.
________|____________________________________________________
to      |  Replies to the sender, plus all recipients in  the
        |  To: header field.
________|____________________________________________________
all     |  Forms a reply to the sender, plus all recipients.
cc      |
________|____________________________________________________
Depending on your answer, repl is given a different argument to form your reply. Please see the Section Replying to Messages: repl for more details. Specifically, a choice of from or none at all runs repl -nocc all, and a choice of to runs repl -cc to. Finally, either cc or all runs repl -cc all -nocc me.

Two windows are then created. One window contains the message to which you are replying. Your draft, in MH-Letter mode (described in the Section Editing a Draft), is in the other window.

If you wish to customize the header or other parts of the reply draft, please see the Section The replcomps File.

Forwarding Mail

To forward a message, use the f command. You are given a draft to edit that looks like it would if you had run the MH command forw(1) (see the Section Forwarding Messages: forw). You are given a chance to add some text (see the Section Editing a Draft).

You can forward several messages by using a prefix argument; in this case, you are prompted for the name of a sequence, a symbolic name that represents a list or range of message numbers (for example, C-u f forbob RET). All of the messages in the sequence are inserted into your draft. By the way, although sequences are often mentioned in this chapter, you don't have to worry about them for now; the full description of sequences in mh-e is at the end in the Section Using Sequences. The Section More About Sequences covers sequences in general.

Redistributing Your Mail

The command M-d is similar in function to forwarding mail, but it does not allow you to edit the message, nor does it add your name to the From: header field. It appears to the recipient as if the message had come from the original sender. For more information on redistributing messages, see the Section Distributing Messages with dist. Also investigate the M-a command in the Section Editing Old Drafts and Bounced Messages for another way to redistribute messages.

Editing Old Drafts and Bounced Messages

If you don't complete a draft for one reason or another, and if the draft buffer is no longer available, you can pick your draft up again with M-a. If you don't use a draft folder, your last draft file will be used. If you use draft folders, which I recommend (see the Section Draft Folder), you'll need to visit the draft folder with M-f drafts RET, use n to move to the appropriate message, and then use M-a to prepare the message for editing.

The M-a command can also be used to take messages that were sent to you and to send them to more people.

On the other hand, you might have received a message from the Mailer-Daemon complaining that your mail wasn't posted for some reason or another. In this case, use M-e to prepare the message for editing. It does this by removing the Mailer-Daemon envelope and unneeded header fields. Fix whatever addressing problem you had, and send the message again with C-c C-c.

[Table of Contents] [Index] [Previous: Reading Your Mail] [Next: Editing a Draft]


(This section was written by Bill Wohler.)
Last change $Date: 1996/07/14 17:35:00 $

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: Bill Wohler <wohler@newt.com>