O'Reilly logo

Learning GNU Emacs, Second Edition by Eric S. Raymond, Bill Rosenblatt, Debra Cameron

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sending Mail from Within Emacs

Sending mail from inside Emacs is easy. To send a message, type C-x m, which brings you into an Emacs-created buffer called *mail*.

Type: C-x m

Sending Mail from Within Emacs

You’re ready to type a mail message.

Type the email address of the person you’re sending mail to in the To: field, then the subject, if you want to, on the next line. You can send a single message to several recipients by putting many addresses on the To: line. Make sure you put a comma between each address. If you have more than one line of recipients, leave a blank space on the second and subsequent lines and keep typing (this works for all the fields you can put email addresses in, such as CC: and BCC: fields which we’ll discuss shortly).

When you’re ready to write the body of the message, move the cursor below the --text follows this line-- message and write your message as you would any Emacs file. Don’t erase or modify the marker --text follows this line--; Emacs needs it to divide the header from the body of the message and breaks if you erase it. This message won’t be sent with your mail; it only shows you where the mail’s header (the recipients, the subject, etc.) ends and the text begins.

While you’re writing the message, you can use any of Emacs’ features, including the spell checker, abbreviation mode, and so on. When you’re finished, you can send the message by typing C-c C-c or by selecting ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required