annotate doc/emacs/sending.texi @ 94936:abd9e2a3d739

Include font.h. (print_object): Handle font-related objects.
author Kenichi Handa <handa@m17n.org>
date Wed, 14 May 2008 01:39:58 +0000
parents 5d58981e6690
children cb5d2387102c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
84267
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
1 @c This is part of the Emacs manual.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
2 @c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, 2002,
87903
5d58981e6690 Merge from emacs--rel--22
Miles Bader <miles@gnu.org>
parents: 84267
diff changeset
3 @c 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
84267
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
4 @c See file emacs.texi for copying conditions.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
5 @node Sending Mail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
6 @chapter Sending Mail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
7 @cindex sending mail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
8 @cindex mail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
9 @cindex message
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
10
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
11 To send a message in Emacs, you start by typing a command (@kbd{C-x m})
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
12 to select and initialize the @samp{*mail*} buffer. Then you edit the text
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
13 and headers of the message in this buffer, and type another command
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
14 (@kbd{C-c C-s} or @kbd{C-c C-c}) to send the message.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
15
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
16 @table @kbd
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
17 @item C-x m
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
18 Begin composing a message to send (@code{compose-mail}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
19 @item C-x 4 m
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
20 Likewise, but display the message in another window
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
21 (@code{compose-mail-other-window}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
22 @item C-x 5 m
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
23 Likewise, but make a new frame (@code{compose-mail-other-frame}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
24 @item C-c C-s
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
25 In Mail mode, send the message (@code{mail-send}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
26 @item C-c C-c
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
27 Send the message and bury the mail buffer (@code{mail-send-and-exit}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
28 @end table
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
29
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
30 @kindex C-x m
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
31 @findex compose-mail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
32 @kindex C-x 4 m
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
33 @findex compose-mail-other-window
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
34 @kindex C-x 5 m
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
35 @findex compose-mail-other-frame
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
36 The command @kbd{C-x m} (@code{compose-mail}) selects a buffer named
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
37 @samp{*mail*} and initializes it with the skeleton of an outgoing
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
38 message. @kbd{C-x 4 m} (@code{compose-mail-other-window}) selects the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
39 @samp{*mail*} buffer in a different window, leaving the previous current
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
40 buffer visible. @kbd{C-x 5 m} (@code{compose-mail-other-frame}) creates
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
41 a new frame to select the @samp{*mail*} buffer.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
42
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
43 Because the mail-composition buffer is an ordinary Emacs buffer, you can
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
44 switch to other buffers while in the middle of composing mail, and switch
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
45 back later (or never). If you use the @kbd{C-x m} command again when you
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
46 have been composing another message but have not sent it, you are asked to
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
47 confirm before the old message is erased. If you answer @kbd{n}, the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
48 @samp{*mail*} buffer remains selected with its old contents, so you can
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
49 finish the old message and send it. @kbd{C-u C-x m} is another way to do
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
50 this. Sending the message marks the @samp{*mail*} buffer ``unmodified,''
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
51 which avoids the need for confirmation when @kbd{C-x m} is next used.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
52
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
53 If you are composing a message in the @samp{*mail*} buffer and want to
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
54 send another message before finishing the first, rename the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
55 @samp{*mail*} buffer using @kbd{M-x rename-uniquely} (@pxref{Misc
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
56 Buffer}). Then you can use @kbd{C-x m} or its variants described above
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
57 to make a new @samp{*mail*} buffer. Once you've done that, you can work
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
58 with each mail buffer independently.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
59
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
60 @vindex mail-default-directory
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
61 The variable @code{mail-default-directory} controls the default
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
62 directory for mail buffers, and also says where to put their auto-save
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
63 files.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
64
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
65 @ignore
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
66 @c Commented out because it is not user-oriented;
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
67 @c it doesn't say how to do some job. -- rms.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
68 @cindex directory servers
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
69 @cindex LDAP
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
70 @cindex PH/QI
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
71 @cindex names and addresses
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
72 There is an interface to directory servers using various protocols such
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
73 as LDAP or the CCSO white pages directory system (PH/QI), described in a
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
74 separate manual. It may be useful for looking up names and addresses.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
75 @xref{Top,,EUDC, eudc, EUDC Manual}.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
76 @end ignore
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
77
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
78 @menu
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
79 * Format: Mail Format. Format of the mail being composed.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
80 * Headers: Mail Headers. Details of permitted mail header fields.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
81 * Aliases: Mail Aliases. Abbreviating and grouping mail addresses.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
82 * Mode: Mail Mode. Special commands for editing mail being composed.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
83 * Amuse: Mail Amusements. Distracting the NSA; adding fortune messages.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
84 * Methods: Mail Methods. Using alternative mail-composition methods.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
85 @end menu
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
86
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
87 @node Mail Format
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
88 @section The Format of the Mail Buffer
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
89
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
90 In addition to the @dfn{text} or @dfn{body}, a message has @dfn{header
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
91 fields} which say who sent it, when, to whom, why, and so on. Some
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
92 header fields, such as @samp{Date} and @samp{Sender}, are created
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
93 automatically when you send the message. Others, such as the recipient
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
94 names, must be specified by you in order to send the message properly.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
95
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
96 In the mail buffer, you can insert and edit header fields using
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
97 ordinary editing commands. Mail mode provides a commands to help you
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
98 edit some header fields, and some are preinitialized in the buffer
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
99 automatically when appropriate.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
100
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
101 The line in the buffer that says
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
102
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
103 @example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
104 --text follows this line--
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
105 @end example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
106
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
107 @noindent
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
108 is a special delimiter that separates the headers you have specified from
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
109 the text. Whatever follows this line is the text of the message; the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
110 headers precede it. The delimiter line itself does not appear in the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
111 message actually sent. The text used for the delimiter line is controlled
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
112 by the variable @code{mail-header-separator}.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
113
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
114 Here is an example of what the headers and text in the mail buffer
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
115 might look like.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
116
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
117 @example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
118 To: gnu@@gnu.org
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
119 CC: lungfish@@spam.org, byob@@spam.org
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
120 Subject: The Emacs Manual
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
121 --Text follows this line--
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
122 Please ignore this message.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
123 @end example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
124
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
125 @node Mail Headers
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
126 @section Mail Header Fields
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
127 @cindex headers (of mail message)
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
128
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
129 A header field in the mail buffer starts with a field name at the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
130 beginning of a line, terminated by a colon. Upper and lower case are
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
131 equivalent in field names (and in mailing addresses also). After the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
132 colon and optional whitespace comes the contents of the field.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
133
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
134 You can use any name you like for a header field, but normally people
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
135 use only standard field names with accepted meanings. Here is a table
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
136 of fields commonly used in outgoing messages.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
137
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
138 @table @samp
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
139 @item To
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
140 This field contains the mailing addresses to which the message is
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
141 addressed. If you list more than one address, use commas, not spaces,
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
142 to separate them.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
143
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
144 @item Subject
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
145 The contents of the @samp{Subject} field should be a piece of text
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
146 that says what the message is about. The reason @samp{Subject} fields
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
147 are useful is that most mail-reading programs can provide a summary of
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
148 messages, listing the subject of each message but not its text.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
149
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
150 @item CC
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
151 This field contains additional mailing addresses to send the message to,
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
152 like @samp{To} except that these readers should not regard the message
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
153 as directed at them.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
154
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
155 @item BCC
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
156 This field contains additional mailing addresses to send the message to,
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
157 which should not appear in the header of the message actually sent.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
158 Copies sent this way are called @dfn{blind carbon copies}.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
159
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
160 @vindex mail-self-blind
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
161 @cindex copy of every outgoing message
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
162 To send a blind carbon copy of every outgoing message to yourself, set
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
163 the variable @code{mail-self-blind} to @code{t}. To send a blind carbon
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
164 copy of every message to some other @var{address}, set the variable
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
165 @code{mail-default-headers} to @code{"Bcc: @var{address}\n"}.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
166
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
167 @item FCC
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
168 This field contains the name of one file and directs Emacs to append a
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
169 copy of the message to that file when you send the message. If the file
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
170 is in Rmail format, Emacs writes the message in Rmail format; otherwise,
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
171 Emacs writes the message in system mail file format. To specify
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
172 more than one file, use several @samp{FCC} fields, with one file
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
173 name in each field.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
174
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
175 @vindex mail-archive-file-name
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
176 To put a fixed file name in the @samp{FCC} field each time you start
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
177 editing an outgoing message, set the variable
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
178 @code{mail-archive-file-name} to that file name. Unless you remove the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
179 @samp{FCC} field before sending, the message will be written into that
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
180 file when it is sent.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
181
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
182 @item From
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
183 Use the @samp{From} field to say who you are, when the account you are
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
184 using to send the mail is not your own. The contents of the @samp{From}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
185 field should be a valid mailing address, since replies will normally go
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
186 there. If you don't specify the @samp{From} field yourself, Emacs uses
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
187 the value of @code{user-mail-address} as the default.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
188
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
189 @item Reply-to
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
190 Use this field to direct replies to a different address. Most
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
191 mail-reading programs (including Rmail) automatically send replies to
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
192 the @samp{Reply-to} address in preference to the @samp{From} address.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
193 By adding a @samp{Reply-to} field to your header, you can work around
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
194 any problems your @samp{From} address may cause for replies.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
195
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
196 @cindex @env{REPLYTO} environment variable
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
197 @vindex mail-default-reply-to
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
198 To put a fixed @samp{Reply-to} address into every outgoing message, set
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
199 the variable @code{mail-default-reply-to} to that address (as a string).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
200 Then @code{mail} initializes the message with a @samp{Reply-to} field as
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
201 specified. You can delete or alter that header field before you send
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
202 the message, if you wish. When Emacs starts up, if the environment
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
203 variable @env{REPLYTO} is set, @code{mail-default-reply-to} is
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
204 initialized from that environment variable.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
205
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
206 @item In-reply-to
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
207 This field contains a piece of text describing the message you are
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
208 replying to. Some mail systems can use this information to correlate
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
209 related pieces of mail. Normally this field is filled in by Rmail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
210 when you reply to a message in Rmail, and you never need to
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
211 think about it (@pxref{Rmail}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
212
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
213 @item References
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
214 This field lists the message IDs of related previous messages. Rmail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
215 sets up this field automatically when you reply to a message.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
216 @end table
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
217
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
218 The @samp{To}, @samp{CC}, and @samp{BCC} header fields can appear
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
219 any number of times, and each such header field can contain multiple
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
220 addresses, separated by commas. This way, you can specify any number
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
221 of places to send the message. These fields can also have
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
222 continuation lines: one or more lines starting with whitespace,
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
223 following the starting line of the field, are considered part of the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
224 field. Here's an example of a @samp{To} field with a continuation
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
225 line:
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
226
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
227 @example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
228 @group
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
229 To: foo@@here.net, this@@there.net,
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
230 me@@gnu.cambridge.mass.usa.earth.spiral3281
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
231 @end group
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
232 @end example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
233
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
234 @vindex mail-from-style
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
235 When you send the message, if you didn't write a @samp{From} field
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
236 yourself, Emacs puts in one for you. The variable
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
237 @code{mail-from-style} controls the format:
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
238
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
239 @table @code
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
240 @item nil
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
241 Use just the email address, as in @samp{king@@grassland.com}.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
242 @item parens
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
243 Use both email address and full name, as in:@*
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
244 @samp{king@@grassland.com (Elvis Parsley)}.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
245 @item angles
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
246 Use both email address and full name, as in:@*
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
247 @samp{Elvis Parsley <king@@grassland.com>}.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
248 @item system-default
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
249 Allow the system to insert the @samp{From} field.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
250 @end table
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
251
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
252 @vindex mail-default-headers
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
253 You can direct Emacs to insert certain default headers into the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
254 outgoing message by setting the variable @code{mail-default-headers}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
255 to a string. Then @code{C-x m} inserts this string into the message
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
256 headers. If the default header fields are not appropriate for a
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
257 particular message, edit them as appropriate before sending the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
258 message.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
259
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
260 @node Mail Aliases
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
261 @section Mail Aliases
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
262 @cindex mail aliases
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
263 @cindex @file{.mailrc} file
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
264 @cindex mailrc file
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
265
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
266 You can define @dfn{mail aliases} in a file named @file{~/.mailrc}.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
267 These are short mnemonic names which stand for mail addresses or groups of
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
268 mail addresses. Like many other mail programs, Emacs expands aliases
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
269 when they occur in the @samp{To}, @samp{From}, @samp{CC}, @samp{BCC}, and
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
270 @samp{Reply-to} fields, plus their @samp{Resent-} variants.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
271
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
272 To define an alias in @file{~/.mailrc}, write a line in the following
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
273 format:
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
274
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
275 @example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
276 alias @var{shortaddress} @var{fulladdresses}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
277 @end example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
278
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
279 @noindent
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
280 Here @var{fulladdresses} stands for one or more mail addresses for
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
281 @var{shortaddress} to expand into. Separate multiple addresses with
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
282 spaces; if an address contains a space, quote the whole address with a
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
283 pair of double-quotes.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
284
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
285 For instance, to make @code{maingnu} stand for
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
286 @code{gnu@@gnu.org} plus a local address of your own, put in
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
287 this line:@refill
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
288
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
289 @example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
290 alias maingnu gnu@@gnu.org local-gnu
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
291 @end example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
292
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
293 @noindent
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
294 Addresses specified in this way should use doublequotes around an
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
295 entire address when the address contains spaces. But you need not
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
296 include doublequotes around parts of the address, such as the person's
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
297 full name. Emacs puts them in if they are needed. For example,
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
298
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
299 @example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
300 alias chief-torturer "George W. Bush <bush@@whitehouse.gov>"
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
301 @end example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
302
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
303 @noindent
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
304 is correct in @samp{.mailrc}. Emacs will insert the address as
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
305 @samp{"George W. Bush" <bush@@whitehouse.gov>}.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
306
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
307 Emacs also recognizes ``include'' commands in @samp{.mailrc} files.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
308 They look like this:
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
309
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
310 @example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
311 source @var{filename}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
312 @end example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
313
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
314 @noindent
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
315 The file @file{~/.mailrc} is used primarily by other mail-reading
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
316 programs; it can contain various other commands. Emacs ignores
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
317 everything in it except for alias definitions and include commands.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
318
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
319 @findex define-mail-alias
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
320 Another way to define a mail alias, within Emacs alone, is with the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
321 @code{define-mail-alias} command. It prompts for the alias and then the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
322 full address. You can use it to define aliases in your @file{.emacs}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
323 file, like this:
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
324
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
325 @example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
326 (define-mail-alias "maingnu" "gnu@@gnu.org")
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
327 @end example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
328
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
329 @vindex mail-aliases
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
330 @code{define-mail-alias} records aliases by adding them to a
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
331 variable named @code{mail-aliases}. If you are comfortable with
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
332 manipulating Lisp lists, you can set @code{mail-aliases} directly. The
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
333 initial value of @code{mail-aliases} is @code{t}, which means that
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
334 Emacs should read @file{.mailrc} to get the proper value.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
335
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
336 @vindex mail-personal-alias-file
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
337 You can specify a different file name to use instead of
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
338 @file{~/.mailrc} by setting the variable
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
339 @code{mail-personal-alias-file}.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
340
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
341 @findex expand-mail-aliases
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
342 Normally, Emacs expands aliases when you send the message. You do not
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
343 need to expand mail aliases before sending the message, but you can
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
344 expand them if you want to see where the mail will actually go. To do
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
345 this, use the command @kbd{M-x expand-mail-aliases}; it expands all mail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
346 aliases currently present in the mail headers that hold addresses.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
347
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
348 If you like, you can have mail aliases expand as abbrevs, as soon as
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
349 you type them in (@pxref{Abbrevs}). To enable this feature, execute the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
350 following:
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
351
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
352 @example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
353 (add-hook 'mail-mode-hook 'mail-abbrevs-setup)
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
354 @end example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
355
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
356 @noindent
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
357 @findex define-mail-abbrev
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
358 @vindex mail-abbrevs
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
359 This can go in your @file{.emacs} file. @xref{Hooks}. If you use this
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
360 feature, you must use @code{define-mail-abbrev} instead of
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
361 @code{define-mail-alias}; the latter does not work with this package.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
362 Note that the mail abbreviation package uses the variable
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
363 @code{mail-abbrevs} instead of @code{mail-aliases}, and that all alias
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
364 names are converted to lower case.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
365
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
366 @kindex C-c C-a @r{(Mail mode)}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
367 @findex mail-interactive-insert-alias
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
368 The mail abbreviation package also provides the @kbd{C-c C-a}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
369 (@code{mail-interactive-insert-alias}) command, which reads an alias
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
370 name (with completion) and inserts its definition at point. This is
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
371 useful when editing the message text itself or a header field such as
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
372 @samp{Subject} in which Emacs does not normally expand aliases.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
373
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
374 Note that abbrevs expand only if you insert a word-separator character
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
375 afterward. However, you can rebind @kbd{C-n} and @kbd{M->} to cause
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
376 expansion as well. Here's how to do that:
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
377
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
378 @smallexample
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
379 (add-hook 'mail-mode-hook
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
380 (lambda ()
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
381 (define-key
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
382 mail-mode-map [remap next-line] 'mail-abbrev-next-line)
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
383 (define-key
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
384 mail-mode-map [remap end-of-buffer] 'mail-abbrev-end-of-buffer)))
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
385 @end smallexample
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
386
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
387 @node Mail Mode
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
388 @section Mail Mode
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
389 @cindex Mail mode
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
390 @cindex mode, Mail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
391
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
392 The major mode used in the mail buffer is Mail mode, which is much
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
393 like Text mode except that various special commands are provided on the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
394 @kbd{C-c} prefix. These commands all have to do specifically with
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
395 editing or sending the message. In addition, Mail mode defines the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
396 character @samp{%} as a word separator; this is helpful for using the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
397 word commands to edit mail addresses.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
398
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
399 Mail mode is normally used in buffers set up automatically by the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
400 @code{mail} command and related commands. However, you can also switch
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
401 to Mail mode in a file-visiting buffer. This is a useful thing to do if
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
402 you have saved the text of a draft message in a file.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
403
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
404 @menu
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
405 * Mail Sending:: Commands to send the message.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
406 * Header Editing:: Commands to move to header fields and edit them.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
407 * Citing Mail:: Copying all or part of a message you are replying to.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
408 * Mail Mode Misc:: Spell checking, signatures, etc.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
409 @end menu
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
410
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
411 @node Mail Sending
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
412 @subsection Mail Sending
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
413
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
414 Mail mode has two commands for sending the message you have been
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
415 editing:
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
416
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
417 @table @kbd
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
418 @item C-c C-s
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
419 Send the message, and leave the mail buffer selected (@code{mail-send}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
420 @item C-c C-c
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
421 Send the message, and select some other buffer (@code{mail-send-and-exit}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
422 @end table
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
423
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
424 @kindex C-c C-s @r{(Mail mode)}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
425 @kindex C-c C-c @r{(Mail mode)}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
426 @findex mail-send
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
427 @findex mail-send-and-exit
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
428 @kbd{C-c C-s} (@code{mail-send}) sends the message and marks the mail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
429 buffer unmodified, but leaves that buffer selected so that you can
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
430 modify the message (perhaps with new recipients) and send it again.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
431 @kbd{C-c C-c} (@code{mail-send-and-exit}) sends and then deletes the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
432 window or switches to another buffer. It puts the mail buffer at the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
433 lowest priority for reselection by default, since you are finished with
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
434 using it. This is the usual way to send the message.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
435
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
436 In a file-visiting buffer, sending the message does not clear the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
437 modified flag, because only saving the file should do that. Also, you
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
438 don't get a warning if you try to send the same message twice.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
439
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
440 @c This is indexed in mule.texi, node "Recognize Coding".
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
441 @c @vindex sendmail-coding-system
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
442 When you send a message that contains non-@acronym{ASCII} characters, they need
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
443 to be encoded with a coding system (@pxref{Coding Systems}). Usually
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
444 the coding system is specified automatically by your chosen language
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
445 environment (@pxref{Language Environments}). You can explicitly specify
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
446 the coding system for outgoing mail by setting the variable
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
447 @code{sendmail-coding-system} (@pxref{Recognize Coding}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
448
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
449 If the coding system thus determined does not handle the characters in
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
450 a particular message, Emacs asks you to select the coding system to use,
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
451 showing a list of possible coding systems.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
452
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
453 @cindex SMTP
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
454 @cindex Feedmail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
455 @cindex Sendmail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
456 @vindex send-mail-function
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
457 The variable @code{send-mail-function} controls how the default mail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
458 user agent sends mail. It should be set to a function. The default
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
459 is @code{sendmail-send-it}, which delivers mail using the Sendmail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
460 installation on the local host. To send mail through a SMTP server,
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
461 set it to @code{smtpmail-send-it} and set up the Emacs SMTP library
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
462 (@pxref{Top,,Emacs SMTP Library, smtpmail, Sending mail via SMTP}). A
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
463 third option is @code{feedmail-send-it}, see the commentary section of
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
464 the @file{feedmail.el} package for more information.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
465
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
466 @node Header Editing
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
467 @subsection Mail Header Editing
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
468
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
469 Mail mode provides special commands to move to particular header
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
470 fields and to complete addresses in headers.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
471
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
472 @table @kbd
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
473 @item C-c C-f C-t
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
474 Move to the @samp{To} header field, creating one if there is none
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
475 (@code{mail-to}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
476 @item C-c C-f C-s
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
477 Move to the @samp{Subject} header field, creating one if there is
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
478 none (@code{mail-subject}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
479 @item C-c C-f C-c
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
480 Move to the @samp{CC} header field, creating one if there is none
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
481 (@code{mail-cc}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
482 @item C-c C-f C-b
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
483 Move to the @samp{BCC} header field, creating one if there is none
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
484 (@code{mail-bcc}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
485 @item C-c C-f C-f
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
486 Move to the @samp{FCC} header field, creating one if there is none
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
487 (@code{mail-fcc}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
488 @item M-@key{TAB}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
489 Complete a mailing address (@code{mail-complete}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
490 @end table
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
491
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
492 @kindex C-c C-f C-t @r{(Mail mode)}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
493 @findex mail-to
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
494 @kindex C-c C-f C-s @r{(Mail mode)}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
495 @findex mail-subject
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
496 @kindex C-c C-f C-c @r{(Mail mode)}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
497 @findex mail-cc
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
498 @kindex C-c C-f C-b @r{(Mail mode)}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
499 @findex mail-bcc
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
500 @kindex C-c C-f C-f @r{(Mail mode)}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
501 @findex mail-fcc
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
502 There are five commands to move point to particular header fields, all
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
503 based on the prefix @kbd{C-c C-f} (@samp{C-f} is for ``field''). They
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
504 are listed in the table above. If the field in question does not exist,
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
505 these commands create one. We provide special motion commands for these
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
506 particular fields because they are the fields users most often want to
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
507 edit.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
508
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
509 @findex mail-complete
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
510 @kindex M-TAB @r{(Mail mode)}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
511 While editing a header field that contains mailing addresses, such
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
512 as @samp{To:}, @samp{CC:} and @samp{BCC:}, you can complete a mailing
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
513 address by typing @kbd{M-@key{TAB}} (@code{mail-complete}). It
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
514 inserts the full name corresponding to the address, if it can
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
515 determine the full name. The variable @code{mail-complete-style}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
516 controls whether to insert the full name, and what style to use, as in
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
517 @code{mail-from-style} (@pxref{Mail Headers}). (If your window
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
518 manager defines @kbd{M-@key{TAB}} to switch windows, you can type
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
519 @kbd{@key{ESC} @key{TAB}} or @kbd{C-M-i}.)
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
520
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
521 For completion purposes, the valid mailing addresses are taken to be
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
522 the local users' names plus your personal mail aliases. You can
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
523 specify additional sources of valid addresses; see the customization
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
524 group @samp{mailalias} to see the variables for customizing this
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
525 feature (@pxref{Customization Groups}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
526
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
527 If you type @kbd{M-@key{TAB}} in the body of the message,
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
528 @code{mail-complete} invokes @code{ispell-complete-word}, as in Text
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
529 mode.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
530
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
531 @node Citing Mail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
532 @subsection Citing Mail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
533 @cindex citing mail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
534
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
535 Mail mode also has commands for yanking or @dfn{citing} all or part of
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
536 a message that you are replying to. These commands are active only when
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
537 you started sending a message using an Rmail command.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
538
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
539 @table @kbd
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
540 @item C-c C-y
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
541 Yank the selected message from Rmail (@code{mail-yank-original}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
542 @item C-c C-r
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
543 Yank the region from the Rmail buffer (@code{mail-yank-region}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
544 @item C-c C-q
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
545 Fill each paragraph cited from another message
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
546 (@code{mail-fill-yanked-message}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
547 @end table
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
548
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
549 @kindex C-c C-y @r{(Mail mode)}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
550 @findex mail-yank-original
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
551 When mail sending is invoked from the Rmail mail reader using an Rmail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
552 command, @kbd{C-c C-y} can be used inside the mail buffer to insert
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
553 the text of the message you are replying to. Normally it indents each line
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
554 of that message three spaces and eliminates most header fields. A numeric
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
555 argument specifies the number of spaces to indent. An argument of just
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
556 @kbd{C-u} says not to indent at all and not to eliminate anything.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
557 @kbd{C-c C-y} always uses the current message from the Rmail buffer,
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
558 so you can insert several old messages by selecting one in Rmail,
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
559 switching to @samp{*mail*} and yanking it, then switching back to
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
560 Rmail to select another.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
561
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
562 @vindex mail-yank-prefix
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
563 You can specify the text for @kbd{C-c C-y} to insert at the beginning
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
564 of each line: set @code{mail-yank-prefix} to the desired string. (A
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
565 value of @code{nil} means to use indentation; this is the default.)
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
566 However, @kbd{C-u C-c C-y} never adds anything at the beginning of the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
567 inserted lines, regardless of the value of @code{mail-yank-prefix}.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
568
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
569 @kindex C-c C-r @r{(Mail mode)}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
570 @findex mail-yank-region
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
571 To yank just a part of an incoming message, set the region in Rmail to
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
572 the part you want; then go to the @samp{*Mail*} message and type
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
573 @kbd{C-c C-r} (@code{mail-yank-region}). Each line that is copied is
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
574 indented or prefixed according to @code{mail-yank-prefix}.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
575
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
576 @kindex C-c C-q @r{(Mail mode)}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
577 @findex mail-fill-yanked-message
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
578 After using @kbd{C-c C-y} or @kbd{C-c C-r}, you can type @kbd{C-c C-q}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
579 (@code{mail-fill-yanked-message}) to fill the paragraphs of the yanked
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
580 old message or messages. One use of @kbd{C-c C-q} fills all such
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
581 paragraphs, each one individually. To fill a single paragraph of the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
582 quoted message, use @kbd{M-q}. If filling does not automatically
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
583 handle the type of citation prefix you use, try setting the fill prefix
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
584 explicitly. @xref{Filling}.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
585
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
586 @node Mail Mode Misc
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
587 @subsection Mail Mode Miscellany
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
588
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
589 @table @kbd
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
590 @item C-c C-t
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
591 Move to the beginning of the message body text (@code{mail-text}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
592 @item C-c C-w
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
593 Insert the file @file{~/.signature} at the end of the message text
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
594 (@code{mail-signature}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
595 @item C-c C-i @var{file} @key{RET}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
596 Insert the contents of @var{file} at the end of the outgoing message
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
597 (@code{mail-attach-file}).
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
598 @item M-x ispell-message
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
599 Perform spelling correction on the message text, but not on citations from
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
600 other messages.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
601 @end table
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
602
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
603 @kindex C-c C-t @r{(Mail mode)}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
604 @findex mail-text
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
605 @kbd{C-c C-t} (@code{mail-text}) moves point to just after the header
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
606 separator line---that is, to the beginning of the message body text.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
607
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
608 @kindex C-c C-w @r{(Mail mode)}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
609 @findex mail-signature
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
610 @vindex mail-signature
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
611 @kbd{C-c C-w} (@code{mail-signature}) adds a standard piece of text at
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
612 the end of the message to say more about who you are. The text comes
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
613 from the file @file{~/.signature} in your home directory. To insert
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
614 your signature automatically, set the variable @code{mail-signature} to
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
615 @code{t}; after that, starting a mail message automatically inserts the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
616 contents of your @file{~/.signature} file. If you want to omit your
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
617 signature from a particular message, delete it from the buffer before
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
618 you send the message.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
619
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
620 You can also set @code{mail-signature} to a string; then that string
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
621 is inserted automatically as your signature when you start editing a
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
622 message to send. If you set it to some other Lisp expression, the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
623 expression is evaluated each time, and its value (which should be a
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
624 string) specifies the signature.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
625
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
626 @findex ispell-message
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
627 You can do spelling correction on the message text you have written
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
628 with the command @kbd{M-x ispell-message}. If you have yanked an
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
629 incoming message into the outgoing draft, this command skips what was
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
630 yanked, but it checks the text that you yourself inserted. (It looks
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
631 for indentation or @code{mail-yank-prefix} to distinguish the cited
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
632 lines from your input.) @xref{Spelling}.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
633
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
634 @kindex C-c C-i @r{(Mail mode)}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
635 @findex mail-attach-file
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
636 To include a file in the outgoing message, you can use @kbd{C-x i},
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
637 the usual command to insert a file in the current buffer. But it is
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
638 often more convenient to use a special command, @kbd{C-c C-i}
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
639 (@code{mail-attach-file}). This command inserts the file contents at
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
640 the end of the buffer, after your signature if any, with a delimiter
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
641 line that includes the file name. Note that this is not a MIME
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
642 attachment.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
643
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
644 @vindex mail-mode-hook
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
645 @vindex mail-setup-hook
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
646 Turning on Mail mode (which @kbd{C-x m} does automatically) runs the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
647 normal hooks @code{text-mode-hook} and @code{mail-mode-hook}.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
648 Initializing a new outgoing message runs the normal hook
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
649 @code{mail-setup-hook}; if you want to add special fields to your mail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
650 header or make other changes to the appearance of the mail buffer, use
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
651 that hook. @xref{Hooks}.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
652
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
653 The main difference between these hooks is just when they are
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
654 invoked. Whenever you type @kbd{M-x mail}, @code{mail-mode-hook} runs
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
655 as soon as the @samp{*mail*} buffer is created. Then the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
656 @code{mail-setup} function inserts the default contents of the buffer.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
657 After these default contents are inserted, @code{mail-setup-hook} runs.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
658
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
659 @node Mail Amusements
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
660 @section Mail Amusements
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
661
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
662 @findex spook
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
663 @cindex NSA
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
664 @kbd{M-x spook} adds a line of randomly chosen keywords to an outgoing
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
665 mail message. The keywords are chosen from a list of words that suggest
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
666 you are discussing something subversive.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
667
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
668 The idea behind this feature is the suspicion that the
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
669 NSA@footnote{The US National Security Agency.} snoops on
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
670 all electronic mail messages that contain keywords suggesting they might
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
671 find them interesting. (The NSA says they don't, but that's what they
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
672 @emph{would} say.) The idea is that if lots of people add suspicious
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
673 words to their messages, the NSA will get so busy with spurious input
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
674 that they will have to give up reading it all.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
675
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
676 Here's how to insert spook keywords automatically whenever you start
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
677 entering an outgoing message:
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
678
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
679 @example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
680 (add-hook 'mail-setup-hook 'spook)
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
681 @end example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
682
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
683 Whether or not this confuses the NSA, it at least amuses people.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
684
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
685 @findex fortune-to-signature
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
686 @cindex fortune cookies
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
687 You can use the @code{fortune} program to put a ``fortune cookie''
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
688 message into outgoing mail. To do this, add
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
689 @code{fortune-to-signature} to @code{mail-setup-hook}:
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
690
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
691 @example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
692 (add-hook 'mail-setup-hook 'fortune-to-signature)
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
693 @end example
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
694
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
695 @node Mail Methods
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
696 @section Mail-Composition Methods
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
697 @cindex mail-composition methods
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
698
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
699 @cindex MH mail interface
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
700 @cindex Message mode for sending mail
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
701 In this chapter we have described the usual Emacs mode for editing
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
702 and sending mail---Mail mode. Emacs has alternative facilities for
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
703 editing and sending mail, including
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
704 MH-E and Message mode, not documented in this manual.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
705 @xref{Top,,MH-E,mh-e, The Emacs Interface to MH}. @xref{Top,,Message,message,
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
706 Message Manual}. You can choose any of them as your preferred method.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
707 The commands @code{C-x m}, @code{C-x 4 m} and @code{C-x 5 m} use
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
708 whichever agent you have specified, as do various other Emacs commands
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
709 and facilities that send mail.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
710
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
711 @vindex mail-user-agent
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
712 To specify your mail-composition method, customize the variable
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
713 @code{mail-user-agent}. Currently legitimate values include
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
714 @code{sendmail-user-agent} (Mail mode), @code{mh-e-user-agent},
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
715 @code{message-user-agent} and @code{gnus-user-agent}.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
716
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
717 If you select a different mail-composition method, the information
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
718 in this chapter about the @samp{*mail*} buffer and Mail mode does not
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
719 apply; the other methods use a different format of text in a different
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
720 buffer, and their commands are different as well.
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
721
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
722 @ignore
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
723 arch-tag: d8a3dfc3-5d87-45c5-a7f2-69871b8e4fd6
63d20bc18919 Move here from ../../man
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
724 @end ignore