Next: Mail Aliases, Previous: Mail Format, Up: Sending Mail
A header field in the mail buffer starts with a field name at the beginning of a line, terminated by a colon. Upper and lower case are equivalent in field names (and in mailing addresses also). After the colon and optional whitespace comes the contents of the field.
You can use any name you like for a header field, but normally people use only standard field names with accepted meanings. Here is a table of fields commonly used in outgoing messages. Emacs preinitializes some of these when you start to compose a mail, depending on various options you can set. You can delete or alter any header field before you send the message, if you wish.
To send a blind carbon copy of every outgoing message to yourself, set
the variable mail-self-blind to t. To send a blind carbon
copy of every message to some other address, set the variable
mail-default-headers to "Bcc: address\n".
To put a fixed file name in the ‘FCC’ field each time you start
editing an outgoing message, set the variable
mail-archive-file-name to that file name. Unless you remove the
‘FCC’ field before sending, the message will be written into that
file when it is sent.
Emacs initializes this field (unless the variable
mail-setup-with-from is nil) using
user-mail-address as the default. If there is no ‘From’
field when you send a mail, Emacs adds one.
To put a fixed ‘Reply-to’ address into every outgoing message, set
the variable mail-default-reply-to to that address (as a string).
Then Emacs initializes the message with a ‘Reply-to’ field as
specified. When you first compose a mail, if
mail-default-reply-to is nil, Emacs initializes it from the
environment variable REPLYTO.
The variable mail-mailing-lists holds a list of mailing list
addresses that you are subscribed to. If it is non-nil, Emacs
inserts an appropriate ‘Mail-followup-to’ header when sending mail
to a mailing list.
The ‘To’, ‘CC’, and ‘BCC’ header fields can appear any number of times, and each such header field can contain multiple addresses, separated by commas. This way, you can specify any number of places to send the message. These fields can also have continuation lines: one or more lines starting with whitespace, following the starting line of the field, are considered part of the field. Here's an example of a ‘To’ field with a continuation line:
To: foo@here.net, this@there.net,
me@gnu.cambridge.mass.usa.earth.spiral3281
When you send the message, if you didn't write a ‘From’ field
yourself, Emacs puts in one for you, using user-mail-address.
The variable mail-from-style controls the format:
nilparensanglessystem-default You can direct Emacs to insert certain default headers into the
outgoing message by setting the variable mail-default-headers
to a string. Then C-x m inserts this string into the message
headers. If the default header fields are not appropriate for a
particular message, edit them as necessary before sending the message.