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. 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.
The ‘From’ header field identifies the person sending the email
(i.e., you). This should be a valid mailing address, as replies are
normally sent there. The default contents of this header field are
computed from the variables
user-full-name (which specifies
your full name) and
user-mail-address (your email address). On
some operating systems, Emacs initializes these two variables using
environment variables (see General Variables). If this
information is unavailable or wrong, you should customize the
variables yourself (see Easy Customization).
The value of the variable
mail-from-style specifies how to
format the contents of the ‘From’ field:
anglesnormally. But if the address must be quoted to remain syntactically valid under the
anglesformat but not under the
parensinstead. This is the default.
Apart from ‘From’, here is a table of commonly-used fields:
The ‘To’, ‘CC’, and ‘BCC’ 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: email@example.com, firstname.lastname@example.org, email@example.com
You can direct Emacs to insert certain default headers into the mail
buffer by setting the variable
mail-default-headers to a
string. Then C-x m inserts this string into the message
headers. For example, here is how to add a ‘Reply-to’ and
‘FCC’ header to each message:
(setq mail-default-headers "Reply-to: firstname.lastname@example.org\nFCC: ~/Mail/sent")
If the default header fields are not appropriate for a particular message, edit them as necessary before sending the message.