aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2011-12-30 18:19:42 +0800
committerChong Yidong2011-12-30 18:19:42 +0800
commitb30941dba07605b40efbf139eed2007d6b1e5445 (patch)
treeabab54778f52943f8748b3085e5d241974b2958f
parent9858f6c326dfad35733b0dc86231bdd97f2b7703 (diff)
downloademacs-b30941dba07605b40efbf139eed2007d6b1e5445.tar.gz
emacs-b30941dba07605b40efbf139eed2007d6b1e5445.zip
Update Sending Mail chapter of Emacs manual.
* sending.texi (Sending Mail): Document initial mail buffer name, and changed multiple mail buffer behavior. (Mail Format): Put the example at the top of the section. (Mail Headers): Move discussion of "From" to the top. (Mail Sending): Document sendmail-query-once. (Citing Mail): Make it less Rmail-specific.
-rw-r--r--admin/FOR-RELEASE2
-rw-r--r--doc/emacs/ChangeLog9
-rw-r--r--doc/emacs/sending.texi305
-rw-r--r--etc/NEWS13
4 files changed, 155 insertions, 174 deletions
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 65f98c85496..e8e756081ed 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -169,7 +169,7 @@ regs.texi cyd
169rmail.texi 169rmail.texi
170screen.texi cyd 170screen.texi cyd
171search.texi cyd 171search.texi cyd
172sending.texi 172sending.texi cyd
173text.texi cyd 173text.texi cyd
174trouble.texi 174trouble.texi
175vc-xtra.texi cyd 175vc-xtra.texi cyd
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 6e0819621a2..73d9fc4d07f 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,12 @@
12011-12-30 Chong Yidong <cyd@gnu.org>
2
3 * sending.texi (Sending Mail): Document initial mail buffer name,
4 and changed multiple mail buffer behavior.
5 (Mail Format): Put the example at the top of the section.
6 (Mail Headers): Move discussion of "From" to the top.
7 (Mail Sending): Document sendmail-query-once.
8 (Citing Mail): Make it less Rmail-specific.
9
12011-12-29 Chong Yidong <cyd@gnu.org> 102011-12-29 Chong Yidong <cyd@gnu.org>
2 11
3 * text.texi (Org Mode): Copyedits. Refer to Outline Format for 12 * text.texi (Org Mode): Copyedits. Refer to Outline Format for
diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi
index 50ec852d740..1c6df362c78 100644
--- a/doc/emacs/sending.texi
+++ b/doc/emacs/sending.texi
@@ -11,10 +11,10 @@
11 11
12@kindex C-x m 12@kindex C-x m
13@findex compose-mail 13@findex compose-mail
14 To send an @dfn{e-mail} message in Emacs, type @kbd{C-x m}. This 14 To send an email message from Emacs, type @kbd{C-x m}. This
15selects and initializes a buffer named @samp{*mail*}, where you can 15switches to a buffer named @samp{*unsent mail*}, where you can edit
16edit the text and headers of the message. Finally, type @kbd{C-c C-s} 16the text and headers of the message. When done, type @kbd{C-c C-s} or
17or @kbd{C-c C-c} to send the message. 17@kbd{C-c C-c} to send it.
18 18
19@table @kbd 19@table @kbd
20@item C-x m 20@item C-x m
@@ -30,37 +30,28 @@ In the mail buffer, send the message and bury the buffer
30(@code{message-send-and-exit}). 30(@code{message-send-and-exit}).
31@end table 31@end table
32 32
33 The mail buffer is an ordinary Emacs buffer, so you can switch to
34other buffers while composing the mail. If you want to send another
35mail before finishing the current one, type @kbd{C-x m} again to open
36a new mail buffer whose name has a different numeric suffix
37(@pxref{Misc Buffer}). If you invoke the command with a prefix
38argument, @w{@kbd{C-u C-x m}}, Emacs switches back to the last mail
39buffer, and asks if you want to erase the message in that buffer; if
40you answer no, this lets you pick up editing the message where you
41left off.
42
33@kindex C-x 4 m 43@kindex C-x 4 m
34@findex compose-mail-other-window 44@findex compose-mail-other-window
35@kindex C-x 5 m 45@kindex C-x 5 m
36@findex compose-mail-other-frame 46@findex compose-mail-other-frame
37@noindent 47 The command @kbd{C-x 4 m} (@code{compose-mail-other-window}) does
38The command @kbd{C-x 4 m} (@code{compose-mail-other-window}) does the 48the same as @kbd{C-x m}, except it displays the mail buffer in a
39same as @kbd{C-x m}, except it displays the mail buffer in a different 49different window. The command @kbd{C-x 5 m}
40window. The command @kbd{C-x 5 m} (@code{compose-mail-other-frame}) 50(@code{compose-mail-other-frame}) does it in a new frame.
41creates a new frame for the mail buffer. 51
42 52 When you type @kbd{C-c C-c} or @kbd{C-c C-s} to send the mail, Emacs
43 Because the mail buffer is an ordinary Emacs buffer, you can switch 53may ask you how it should deliver the mail---either directly via SMTP,
44to other buffers while in the middle of composing mail, and switch 54or using some other method. @xref{Mail Sending}, for details.
45back later (or never). If you type @kbd{C-x m} again when you have
46been composing another message but have not sent it, Emacs asks for
47confirmation before erasing the old message. If you answer @kbd{n},
48Emacs selects the mail buffer with its old contents, so you can finish
49the old message and send it. @kbd{C-u C-x m} is another way to do
50this. Sending the message marks the mail buffer ``unmodified,'' which
51avoids the need for confirmation when @kbd{C-x m} is next used.
52
53 If you want to send another message before finishing the current
54message, use the command @kbd{M-x rename-uniquely} to rename the
55current mail buffer (@pxref{Misc Buffer}). Then you can use @kbd{C-x
56m} to make a new mail buffer, and work with each mail buffer
57independently.
58
59 Before using Emacs to send mail, you may need to customize the
60variable @code{send-mail-function} if your system is not set up to
61deliver mail directly via SMTP (@pxref{Mail Sending}). In addition,
62you may need to customize @code{user-mail-address} if the system
63cannot receive mail via SMTP (@pxref{Mail Headers}).
64 55
65@menu 56@menu
66* Format: Mail Format. Format of a mail message. 57* Format: Mail Format. Format of a mail message.
@@ -75,77 +66,91 @@ cannot receive mail via SMTP (@pxref{Mail Headers}).
75@node Mail Format 66@node Mail Format
76@section The Format of the Mail Buffer 67@section The Format of the Mail Buffer
77 68
78 An email message must contain certain pieces of information, called 69 Here is an example of the contents of a mail buffer:
79@dfn{headers}, which specify the message's sender, recipient(s), and
80so on.
81
82 At the top of the mail buffer is a set of @dfn{header fields}, where
83you can enter this information. You can insert and edit header fields
84using ordinary editing commands. @xref{Header Editing}, for commands
85specific to editing header fields.
86
87 Some header fields are automatically pre-initialized in the buffer,
88when appropriate; other headers, such as @samp{Date} and
89@samp{Message-Id}, are normally omitted from the mail buffer and
90created automatically when the message is sent.
91
92@vindex mail-header-separator
93 The line in the buffer that says
94
95@smallexample
96--text follows this line--
97@end smallexample
98
99@noindent
100separates the header fields from the @dfn{body} (or @dfn{text}) of the
101message. Everything above this line is treated as part of the
102headers; everything below it is treated as the body. The delimiter
103line itself does not appear in the message actually sent. The text
104used for the delimiter line is controlled by the variable
105@code{mail-header-separator}.
106
107 Here is an example of what the headers and text in the mail buffer
108might look like.
109 70
110@example 71@example
111To: gnu@@example.org 72To: subotai@@example.org
112CC: lungfish@@example.com, byob@@example.net 73CC: mongol.soldier@@example.net, rms@@gnu.org
113Subject: The Emacs Manual 74Subject: Re: What is best in life?
75From: conan@@example.org
114--text follows this line-- 76--text follows this line--
115Please ignore this message. 77To crush your enemies, see them driven before you, and to hear the
78lamentation of their women.
116@end example 79@end example
117 80
81@noindent
82At the top of the mail buffer is a set of @dfn{header fields}, which
83are used for specifying information about the email's recipient(s),
84subject, and so on. The above buffer contains header fields for
85@samp{To}, @samp{Cc}, @samp{Subject}, and @samp{From}. Some header
86fields are automatically pre-initialized in the mail buffer, when
87appropriate.
88
89 The line that says @samp{--text follows this line--} separates the
90header fields from the @dfn{body} (or @dfn{text}) of the message.
91Everything above that line is treated as part of the headers;
92everything below it is treated as the body. The delimiter line itself
93does not appear in the message actually sent.
94
95 You can insert and edit header fields using ordinary editing
96commands. @xref{Header Editing}, for commands specific to editing
97header fields. Certain headers, such as @samp{Date} and
98@samp{Message-Id}, are normally omitted from the mail buffer and are
99created automatically when the message is sent.
100
118@node Mail Headers 101@node Mail Headers
119@section Mail Header Fields 102@section Mail Header Fields
120@cindex headers (of mail message) 103@cindex headers (of mail message)
121 104
122 A header field in the mail buffer starts with a field name at the 105 A header field in the mail buffer starts with a field name at the
123beginning of a line, terminated by a colon. Upper and lower case are 106beginning of a line, terminated by a colon. Upper and lower case are
124equivalent in field names (and in mailing addresses also). After the 107equivalent in field names. After the colon and optional whitespace
125colon and optional whitespace comes the contents of the field. 108comes the contents of the field.
126 109
127 You can use any name you like for a header field, but normally 110 You can use any name you like for a header field, but normally
128people use only standard field names with accepted meanings. Here is 111people use only standard field names with accepted meanings.
129a table of commonly-used fields. Emacs pre-initializes some of these,
130depending on various options you can set. You can delete or alter any
131header field before you send the message, if you wish.
132 112
133@table @samp 113@vindex user-full-name
134@item From
135@vindex user-mail-address 114@vindex user-mail-address
136The address of the sender (you). This should be a valid mailing 115 The @samp{From} header field identifies the person sending the email
137address, as replies will normally go there. Emacs initializes this 116(i.e.@: you). This should be a valid mailing address, as replies are
138field using the variables @code{user-full-name} and 117normally sent there. The default contents of this header field are
139@code{user-mail-address}; see below. 118computed from the variables @code{user-full-name} (which specifies
119your full name) and @code{user-mail-address} (your email address). On
120some operating systems, Emacs initializes these two variables using
121environment variables (@pxref{General Variables}). If this
122information is unavailable or wrong, you should customize the
123variables yourself (@pxref{Easy Customization}).
140 124
125@vindex mail-from-style
126 The value of the variable @code{mail-from-style} specifies how to
127format the contents of the @samp{From} field:
128
129@table @asis
130@item @code{nil}
131Use just the address, as in @samp{king@@grassland.com}.
132@item @code{parens}
133Use both address and full name, as in:@*
134@samp{king@@grassland.com (Elvis Parsley)}.
135@item @code{angles}
136Use both address and full name, as in:@*
137@samp{Elvis Parsley <king@@grassland.com>}.
138@item any other value
139Use @code{angles} normally. But if the address must be ``quoted'' to
140remain syntactically valid under the @code{angles} format but not
141under the @code{parens} format, use @code{parens} instead. This is
142the default.
143@end table
144
145 Apart from @samp{From}, here is a table of commonly-used fields:
146
147@table @samp
141@item To 148@item To
142The mailing address(es) to which the message is addressed. To list 149The mailing address(es) to which the message is addressed. To list
143more than one address, use commas (not spaces) to separate them. 150more than one address, use commas to separate them.
144 151
145@item Subject 152@item Subject
146A piece of text saying what the message is about. Most mail-reading 153The subject of the message.
147programs can display a summary of messages, listing the subject of
148each message but not its text.
149 154
150@item CC 155@item CC
151Additional mailing address(es) to send the message to. This is like 156Additional mailing address(es) to send the message to. This is like
@@ -158,47 +163,38 @@ not appear in the header of the message actually sent. ``BCC'' stands
158for @dfn{blind carbon copies}. 163for @dfn{blind carbon copies}.
159 164
160@item FCC 165@item FCC
161The name of one file, to which a copy of the sent message should be 166The name of a file, to which a copy of the sent message should be
162appended. Emacs writes the message in mbox format, unless the file is 167appended. Emacs writes the message in mbox format, unless the file is
163in Babyl format (used by Rmail before Emacs 23), in which case Emacs 168in Babyl format (used by Rmail before Emacs 23), in which case Emacs
164writes Babyl. If an Rmail buffer is visiting the file, Emacs updates 169writes in Babyl format. If an Rmail buffer is visiting the file,
165it accordingly. To specify more than one file, use several @samp{FCC} 170Emacs updates it accordingly. To specify more than one file, use
166fields, with one file name in each field. 171several @samp{FCC} fields, with one file name in each field.
167 172
168@item Reply-to 173@item Reply-to
169An address to which replies should be sent, instead of @samp{From}. 174An address to which replies should be sent, instead of @samp{From}.
170You can use this header if, for some reason, your @samp{From} address 175This is used if, for some reason, your @samp{From} address cannot
171is unable to receive replies. 176receive replies.
172 177
173@item Mail-reply-to 178@item Mail-reply-to
174 This field takes precedence over @samp{Reply-to}. It is used because 179This field takes precedence over @samp{Reply-to}. It is used because
175some mailing lists set the @samp{Reply-to} field for their own purposes 180some mailing lists set the @samp{Reply-to} field for their own
176(a somewhat controversial practice). 181purposes (a somewhat controversial practice).
177 182
178@item Mail-followup-to 183@item Mail-followup-to
179 This field contains one or more addresses. It is typically used when 184One of more address(es) to use as default recipient(s) for follow-up
180you reply to a message from a mailing list that you are subscribed to. 185messages. This is typically used when you reply to a message from a
181It usually indicates that you want replies to go to the list, and that 186mailing list that you are subscribed to, and want replies to go to the
182you do not need an extra copy sent directly to you. 187list without sending an extra copy to you.
183
184@c Message mode handles this differently...
185@c @vindex mail-mailing-lists
186@c The variable @code{mail-mailing-lists} holds a list of mailing list
187@c addresses that you are subscribed to. If it is non-@code{nil}, Emacs
188@c inserts an appropriate @samp{Mail-followup-to} header when sending mail
189@c to a mailing list.
190 188
191@item In-reply-to 189@item In-reply-to
192A piece of text describing the message you are replying to. Some mail 190An identifier for the message you are replying to. Most mail readers
193systems can use this information to correlate related pieces of mail. 191use this information to group related messages together. Normally,
194Normally, you never need to think about this, because it is filled in 192this header is filled in automatically when you reply to a message in
195automatically when you reply to a message in Rmail (or any other mail 193any mail program built into Emacs.
196program built into Emacs).
197 194
198@item References 195@item References
199The Message-Ids of previous related messages (a Message-Id is a unique 196Identifiers for previous related messages. Like @samp{In-reply-to},
200identifier generated when a message is sent). Like 197this is normally filled in automatically for you.
201@samp{In-reply-to}, this is normally set up automatically for you.
202@end table 198@end table
203 199
204@noindent 200@noindent
@@ -217,35 +213,6 @@ To: foo@@example.net, this@@example.net,
217@end group 213@end group
218@end example 214@end example
219 215
220@vindex user-full-name
221@vindex user-mail-address
222 The default contents of the @samp{From} header field are computed
223from the variables @code{user-full-name} and @code{user-mail-address}.
224On some operating systems, Emacs initializes these two variables using
225environment variables (@pxref{General Variables}). If this
226information is unavailable or wrong, you can customize the variables
227yourself (@pxref{Easy Customization}).
228
229@vindex mail-from-style
230 The value of the variable @code{mail-from-style} specifies how to
231format the address in the @samp{From} field:
232
233@table @asis
234@item @code{nil}
235Use just the address, as in @samp{king@@grassland.com}.
236@item @code{parens}
237Use both address and full name, as in:@*
238@samp{king@@grassland.com (Elvis Parsley)}.
239@item @code{angles}
240Use both address and full name, as in:@*
241@samp{Elvis Parsley <king@@grassland.com>}.
242@item any other value
243Use @code{angles} for most addresses. However, if the address must be
244``quoted'' to remain syntactically-valid under the @code{angles}
245format but not under the @code{parens} format, use @code{parens}
246instead. This is the default.
247@end table
248
249@c There is also mail-specify-envelope-from and mail-envelope-from, but 216@c There is also mail-specify-envelope-from and mail-envelope-from, but
250@c these are probably not topics for the Emacs manual. 217@c these are probably not topics for the Emacs manual.
251 218
@@ -273,13 +240,12 @@ particular message, edit them as necessary before sending the message.
273@vindex mail-personal-alias-file 240@vindex mail-personal-alias-file
274 241
275 You can define @dfn{mail aliases}, which are short mnemonic names 242 You can define @dfn{mail aliases}, which are short mnemonic names
276that stand for mail addresses or groups of mail addresses. By 243that stand for one or more mailing addresses. By default, mail
277default, mail aliases are defined in the file @file{~/.mailrc}. You 244aliases are defined in the file @file{~/.mailrc}. You can specify a
278can specify a different file name to use, by setting the variable 245different file name to use, by setting the variable
279@code{mail-personal-alias-file}. 246@code{mail-personal-alias-file}.
280 247
281 To define an alias in @file{.mailrc}, write a line in the following 248 To define an alias in @file{.mailrc}, write a line like this:
282format:
283 249
284@example 250@example
285alias @var{nick} @var{fulladdresses} 251alias @var{nick} @var{fulladdresses}
@@ -409,33 +375,39 @@ showing a list of possible coding systems.
409@cindex Sendmail 375@cindex Sendmail
410@cindex Mailclient 376@cindex Mailclient
411@vindex send-mail-function 377@vindex send-mail-function
412 The variable @code{send-mail-function} controls how the default mail 378 The variable @code{send-mail-function} controls how the message is
413user agent sends mail. Its value should be a function, which can be 379delivered. Its value should be a function, which can be one of the
414one of the following: 380following:
415 381
416@table @code 382@table @code
383@item sendmail-query-once
384This function queries for a delivery method (one of the other entries
385in this list), and uses that method for this message. Then it saves
386the method to @code{send-mail-function}, so that the method is used
387for future deliveries. This is the default, unless you have already
388configured the @code{smtpmail-send-it} method.
389
390@item smtpmail-send-it
391Send mail through an external mail host, such as your Internet service
392provider's outgoing SMTP mail server. If you have not told Emacs how
393to contact the SMTP server, it prompts for this information (which is
394saved in the variables @code{smtpmail-smtp-server} and
395@code{smtpmail-auth-credentials}). @xref{Top,,Emacs SMTP Library,
396smtpmail, Sending mail via SMTP}.
397
417@item sendmail-send-it 398@item sendmail-send-it
418Send mail using the system's default @command{sendmail} (or 399Send mail using the system's default @command{sendmail} program, or
419@command{sendmail}-compatible) program. This is the default on Unix 400equivalent. This requires the system to be set up for delivering mail
420and GNU, and works provided the system is a valid @dfn{mail host} 401directly via SMTP.
421(that is, provided it can deliver mail via SMTP).
422 402
423@item mailclient-send-it 403@item mailclient-send-it
424Pass the mail buffer on to the system's designated mail client (see 404Pass the mail buffer on to the system's designated mail client. See
425@file{mailclient.el}). This is the default on Mac OS X and 405the commentary section in the file @file{mailclient.el} for details.
426MS-Windows.
427
428@item smtpmail-send-it
429Send mail through an external mail host (e.g., your Internet service
430provider's SMTP server). You will need to tell Emacs how to contact
431the SMTP server, by customizing the variables
432@code{smtpmail-smtp-server} and @code{smtpmail-auth-credentials}.
433@xref{Top,,Emacs SMTP Library, smtpmail, Sending mail via SMTP}.
434 406
435@item feedmail-send-it 407@item feedmail-send-it
436This is similar to @code{sendmail-send-it}, but allows you to queue 408This is similar to @code{sendmail-send-it}, but allows you to queue
437messages for later sending. See the commentary section in the file 409messages for later sending. See the commentary section in the file
438@file{feedmail.el} for more information. 410@file{feedmail.el} for details.
439@end table 411@end table
440 412
441@node Header Editing 413@node Header Editing
@@ -511,7 +483,8 @@ just inserts a tab character.
511 483
512@table @kbd 484@table @kbd
513@item C-c C-y 485@item C-c C-y
514Yank the selected message from Rmail (@code{message-yank-original}). 486Yank the selected message from the mail reader, as a citation
487(@code{message-yank-original}).
515@item C-c C-q 488@item C-c C-q
516Fill each paragraph cited from another message 489Fill each paragraph cited from another message
517(@code{message-fill-yanked-message}). 490(@code{message-fill-yanked-message}).
@@ -522,9 +495,9 @@ Fill each paragraph cited from another message
522@findex message-yank-prefix 495@findex message-yank-prefix
523 You can use the command @kbd{C-c C-y} (@code{message-yank-original}) 496 You can use the command @kbd{C-c C-y} (@code{message-yank-original})
524to @dfn{cite} a message that you are replying to. This inserts the 497to @dfn{cite} a message that you are replying to. This inserts the
525text of that message into the mail buffer. This command is active 498text of that message into the mail buffer. This command works only if
526only when the mail buffer is invoked from a mail program running in 499the mail buffer is invoked from a mail reader running in Emacs, such
527Emacs, such as Rmail. 500as Rmail.
528 501
529 By default, Emacs inserts the string @samp{>} in front of each line 502 By default, Emacs inserts the string @samp{>} in front of each line
530of the cited text; this prefix string is specified by the variable 503of the cited text; this prefix string is specified by the variable
diff --git a/etc/NEWS b/etc/NEWS
index f37f562ec82..c0058800919 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -116,7 +116,8 @@ and pops down the *Completions* buffer accordingly.
116 116
117** Mail changes 117** Mail changes
118 118
119The default of `send-mail-function' is now `sendmail-query-once', 119+++
120*** The default of `send-mail-function' is now `sendmail-query-once',
120which asks the user (once) whether to use the smtpmail package to send 121which asks the user (once) whether to use the smtpmail package to send
121email, or to use the old defaults that rely on external mail 122email, or to use the old defaults that rely on external mail
122facilities (`sendmail-send-it' on GNU/Linux and other Unix-like 123facilities (`sendmail-send-it' on GNU/Linux and other Unix-like
@@ -156,14 +157,12 @@ If you had that set, then you need to put
156 157
157in your ~/.authinfo file instead. 158in your ~/.authinfo file instead.
158 159
159*** sendmail changes 160*** Mail mode changes (this is the old Mail mode, not Message mode)
160+++ 161+++
161You can now add MIME attachments to outgoing messages with the new 162**** New command `mail-add-attachment' for adding MIME attachments
162command `mail-add-attachment'.
163
164--- 163---
165The command `mail-attach-file' was renamed to `mail-insert-file'; the 164**** The command `mail-attach-file' was renamed to `mail-insert-file'.
166old name is now an obsolete alias to the new name. 165The old name is now an obsolete alias to the new name.
167 166
168** Emacs server and client changes 167** Emacs server and client changes
169+++ 168+++