1. Home
  2. Computing & Technology
  3. Focus on Linux

Mail Headers

Emacs Documentation

By Juergen Haas, About.com

Mail Header Fields

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.

  • To
    This field contains the mailing addresses to which the message is addressed. If you list more than one address, use commas, not spaces, to separate them.
  • Subject
    The contents of the Subject field should be a piece of text that says what the message is about. The reason Subject fields are useful is that most mail-reading programs can provide a summary of messages, listing the subject of each message but not its text.
  • CC
    This field contains additional mailing addresses to send the message to, like To except that these readers should not regard the message as directed at them.
  • BCC
    This field contains additional mailing addresses to send the message to, which should not appear in the header of the message actually sent. Copies sent this way are called blind carbon copies.

    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".

  • FCC
    This field contains the name of one file and directs Emacs to append a copy of the message to that file when you send the message. If the file is in Rmail format, Emacs writes the message in Rmail format; otherwise, Emacs writes the message in system mail file format. To specify more than one file, use several FCC fields, with one file name in each field.

    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.

  • From
    Use the From field to say who you are, when the account you are using to send the mail is not your own. The contents of the From field should be a valid mailing address, since replies will normally go there. If you don't specify the From field yourself, Emacs uses the value of user-mail-address as the default.
  • Reply-to
    Use this field to direct replies to a different address. Most mail-reading programs (including Rmail) automatically send replies to the Reply-to address in preference to the From address. By adding a Reply-to field to your header, you can work around any problems your From address may cause for replies.

    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 mail initializes the message with a Reply-to

    * Emacs Manual Index

Explore Focus on Linux

More from About.com

  1. Home
  2. Computing & Technology
  3. Focus on Linux
  4. Linux Software
  5. Editors
  6. Emacs
  7. Emacs Documentation - Mail Headers

©2008 About.com, a part of The New York Times Company.

All rights reserved.