annotate man/xemacs/sending.texi @ 440:8de8e3f6228a r21-2-28

Import from CVS: tag r21-2-28
author cvs
date Mon, 13 Aug 2007 11:33:38 +0200
parents 3ecd8885ac67
children abe6d1db359e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 @node Sending Mail, Reading Mail, Picture, Top
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 @chapter Sending Mail
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 @cindex mail
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 @cindex message
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 To send a message in Emacs, start by typing the command (@kbd{C-x m})
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 to select and initialize the @samp{*mail*} buffer. You can then edit the text
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 and headers of the message in the mail buffer, and type the command
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10 (@kbd{C-c C-c}) to send the message.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 @item C-x m
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 Begin composing a message to send (@code{mail}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 @item C-x 4 m
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 Likewise, but display the message in another window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 (@code{mail-other-window}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 @item C-c C-c
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 In Mail mode, send the message and switch to another buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20 (@code{mail-send-and-exit}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
23 @kindex C-x m
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 @findex mail
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 @kindex C-x 4 m
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 @findex mail-other-window
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27 The command @kbd{C-x m} (@code{mail}) selects a buffer named
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 @samp{*mail*} and initializes it with the skeleton of an outgoing message.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 @kbd{C-x 4 m} (@code{mail-other-window}) selects the @samp{*mail*} buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 in a different window, leaving the previous current buffer visible.@refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 Because the buffer for mail composition is an ordinary Emacs buffer, you can
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 switch to other buffers while in the middle of composing mail, and switch
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 back later (or never). If you use the @kbd{C-x m} command again when you
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 have been composing another message but have not sent it, a new mail
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 buffer will be created; in this way, you can compose multiple messages
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 at once. You can switch back to and complete an unsent message by using
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38 the normal buffer selection mechanisms.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 @kbd{C-u C-x m} is another way to switch back to a message in progress:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41 it will search for an existing, unsent mail message buffer and select it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 * Format: Mail Format. Format of the mail being composed.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 * Headers: Mail Headers. Details of allowed mail header fields.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 * Mode: Mail Mode. Special commands for editing mail being composed.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 @node Mail Format, Mail Headers, Sending Mail, Sending Mail
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 @section The Format of the Mail Buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52 In addition to the @dfn{text} or contents, a message has @dfn{header
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 fields}, which say who sent it, when, to whom, why, and so on. Some header
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 fields, such as the date and sender, are created automatically after the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 message is sent. Others, such as the recipient names, must be specified by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 you in order to send the message properly.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 Mail mode provides a few commands to help you edit some header fields,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 and some are preinitialized in the buffer automatically at times. You can
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 insert or edit any header fields using ordinary editing commands.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 The line in the buffer that says:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 --text follows this line--
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 @vindex mail-header-separator
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 is a special delimiter that separates the headers you have specified from
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 the text. Whatever follows this line is the text of the message; the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72 headers precede it. The delimiter line itself does not appear in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 message actually sent. The text used for the delimiter line is controlled
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 by the variable @code{mail-header-separator}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 Here is an example of what the headers and text in the @samp{*mail*} buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 might look like.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 To: rms@@mc
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 CC: mly@@mc, rg@@oz
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 Subject: The XEmacs User's Manual
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 --Text follows this line--
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 Please ignore this message.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 @node Mail Headers, Mail Mode, Mail Format, Sending Mail
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 @section Mail Header Fields
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 @cindex headers (of mail message)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91 There are several header fields you can use in the @samp{*mail*} buffer.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 Each header field starts with a field name at the beginning of a line,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
93 terminated by a colon. It does not matter whether you use upper or lower
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
94 case in the field name. After the colon and optional whitespace comes the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
95 contents of the field.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
96
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 @table @samp
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98 @item To
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 This field contains the mailing addresses of the message.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 @item Subject
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 The contents of the @samp{Subject} field should be a piece of text that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 says what the message is about. Subject fields are useful because most
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104 mail-reading programs can provide a summary of messages, listing the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 subject of each message but not its text.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 @item CC
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 This field contains additional mailing addresses to send the message
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 to, but whose readers should not regard the message as addressed to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 them.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 @item BCC
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 This field contains additional mailing addresses to send the message
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 to, but which should not appear in the header of the message actually
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115 sent.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 @item FCC
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118 This field contains the name of one file (in Unix mail file format) to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 which a copy of the message should be appended when the message is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 sent.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 @item From
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 Use the @samp{From} field to say who you are, when the account you are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 using to send the mail is not your own. The contents of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125 @samp{From} field should be a valid mailing address, since replies
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 will normally go there.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128 @item Reply-To
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 Use the @samp{Reply-To} field to direct replies to a different
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 address, not your own. @samp{From} and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 @samp{Reply-To} have the same effect on where replies go, but they convey a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 different meaning to the person who reads the message.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134 @item In-Reply-To
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 This field contains a piece of text describing a message you are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 replying to. Some mail systems can use the information to correlate
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 related pieces of mail. This field is normally filled in by your mail
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 handling package when you are replying to a message and you never need
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 to think about it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 The @samp{To}, @samp{CC}, @samp{BCC} and @samp{FCC} fields can appear
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 any number of times, to specify many places to send the message.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 The @samp{To}, @samp{CC}, and @samp{BCC}, fields can have continuation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 lines. All the lines starting with whitespace, following the line on
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 which the field starts, are considered part of the field. For
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 example,@refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 To: foo@@here, this@@there,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 me@@gnu.cambridge.mass.usa.earth.spiral3281
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158 @vindex mail-abbrev-mailrc-file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 If you have a @file{~/.mailrc} file, Emacs scans it for mail aliases the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 first time you try to send mail in an Emacs session. Emacs expands
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 aliases found in the @samp{To}, @samp{CC}, and @samp{BCC} fields where
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 appropriate. You can set the variable @code{mail-abbrev-mailrc-file} to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 the name of the file with mail aliases. If @code{nil}, @file{~/.mailrc}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164 is used.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 @cindex .mailrc file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 Your @file{.mailrc} file ensures that word-abbrevs are defined for each
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 of your mail aliases when point is in a @samp{To}, @samp{CC},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 @samp{BCC}, or @samp{From} field. The aliases are defined in your
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 @file{.mailrc} file or in a file specified by the @b{MAILRC}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171 environment variable if it exists. Your mail aliases expand any time
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 you type a word-delimiter at the end of an abbreviation.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 In this version of Emacs, what you see is what you get: in contrast to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 some other versions, no abbreviations are expanded after you have sent the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 mail. This means you don't suffer the annoyance of having the system do
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
177 things behind your back---if the system rewrites an address you typed,
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178 you know it immediately, instead of after the mail has been sent and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 it's too late to do anything about it. For example, you will never
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 again be in trouble because you forgot to delete an old alias from your
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 @file{.mailrc} and a new local user is given a userid which conflicts
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182 with one of your aliases.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 @vindex mail-abbrev-mode-regexp
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 Your mail alias abbrevs are in effect only when point is in an
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 appropriate header field. The mail aliases will not expand in the body
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 of the message, or in other header fields. The default mode-specific
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 abbrev table @code{mail-mode-abbrev-table} is used instead if defined.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 That means if you have been using mail-mode specific abbrevs, this code
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 will not adversely affect you. You can control which header fields the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 abbrevs are used in by changing the variable @code{mail-abbrev-mode-regexp}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 If auto-fill mode is on, abbrevs wrap at commas instead of at word
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 boundaries, and header continuation lines will be properly indented.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 @findex mail-interactive-insert-alias
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 You can also insert a mail alias with @code{mail-interactive-insert-alias}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 This function, which is bound to @kbd{C-c C-a}, prompts you for an alias
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199 (with completion) and inserts its expansion at point.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 In this version of Emacs, it is possible to have lines like the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202 following in your @file{.mailrc} file:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 alias someone "John Doe <doe@@quux.com>"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 That is, if you want an address to have embedded spaces, simply surround
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 it with double-quotes. The quotes are necessary because the format of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210 the @file{.mailrc} file uses spaces as address delimiters.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 Aliases in the @file{.mailrc} file may be nested. For example, assume
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 you define aliases like:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 alias group1 fred ethel
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 alias group2 larry curly moe
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 alias everybody group1 group2
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 When you now type @samp{everybody} on the @samp{To} line, it will expand to:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 @example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 fred, ethyl, larry, curly, moe
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
223 @end example
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 Aliases may contain forward references; the alias of @samp{everybody} in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 example above can precede the aliases of @samp{group1} and @samp{group2}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 In this version of Emacs, you can use the @code{source} @file{.mailrc} command
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 for reading aliases from some other file as well.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231 Aliases may contain hyphens, as in @code{"alias foo-bar foo@@bar"}, even
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 though word-abbrevs normally cannot contain hyphens.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 To read in the contents of another @file{.mailrc}-type file from Emacs, use the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235 command @code{M-x merge-mail-aliases}. The @code{rebuild-mail-aliases}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 command is similar, but deletes existing aliases first.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 @vindex mail-alias-seperator-string
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 If you want multiple addresses separated by a string other than @samp{,}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 (a comma), then set the variable @code{mail-alias-seperator-string} to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 it. This has to be a comma bracketed by whitespace if you want any kind
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242 of reasonable behavior.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 @vindex mail-archive-file-name
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 If the variable @code{mail-archive-file-name} is non-@code{nil}, it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 should be a string naming a file. Each time you start to edit a message
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 to send, an @samp{FCC} field is entered for that file. Unless you
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 remove the @samp{FCC} field, every message is written into that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249 file when it is sent.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 @node Mail Mode,, Mail Headers, Sending Mail
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 @section Mail Mode
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254 The major mode used in the @samp{*mail*} buffer is Mail mode. Mail
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 mode is similar to Text mode, but several commands are provided on
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 the @kbd{C-c} prefix. These commands all deal specifically with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 editing or sending the message.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 @item C-c C-s
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 Send the message, and leave the @samp{*mail*} buffer selected
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 (@code{mail-send}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 @item C-c C-c
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 Send the message, and select some other buffer (@code{mail-send-and-exit}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 @item C-c C-f C-t
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266 Move to the @samp{To} header field, creating one if there is none
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 (@code{mail-to}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 @item C-c C-f C-s
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 Move to the @samp{Subject} header field, creating one if there is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 none (@code{mail-subject}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 @item C-c C-f C-c
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 Move to the @samp{CC} header field, creating one if there is none
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273 (@code{mail-cc}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 @item C-c C-w
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 Insert the file @file{~/.signature} at the end of the message text
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 (@code{mail-signature}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 @item C-c C-y
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278 Yank the selected message (@code{mail-yank-original}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279 @item C-c C-q
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
280 Fill all paragraphs of yanked old messages, each individually
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 (@code{mail-fill-yanked-message}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282 @item @key{button3}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
283 Pops up a menu of useful mail-mode commands.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 @kindex C-c C-s (Mail mode)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 @kindex C-c C-c (Mail mode)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288 @findex mail-send
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
289 @findex mail-send-and-exit
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
290 There are two ways to send a message. @kbd{C-c C-c}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
291 (@code{mail-send-and-exit}) is the usual way to send the message. It
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
292 sends the message and then deletes the window (if there is another
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
293 window) or switches to another buffer. It puts the @samp{*mail*} buffer
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
294 at the lowest priority for automatic reselection, since you are finished
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
295 with using it. @kbd{C-c C-s} (@code{mail-send}) sends the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 message and marks the @samp{*mail*} buffer unmodified, but leaves that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
297 buffer selected so that you can modify the message (perhaps with new
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 recipients) and send it again.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300 @kindex C-c C-f C-t (Mail mode)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 @findex mail-to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 @kindex C-c C-f C-s (Mail mode)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303 @findex mail-subject
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 @kindex C-c C-f C-c (Mail mode)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 @findex mail-cc
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 Mail mode provides some other special commands that are useful for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307 editing the headers and text of the message before you send it. There are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 three commands defined to move point to particular header fields, all based
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309 on the prefix @kbd{C-c C-f} (@samp{C-f} is for ``field''). They are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310 @kbd{C-c C-f C-t} (@code{mail-to}) to move to the @samp{To} field, @kbd{C-c
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311 C-f C-s} (@code{mail-subject}) for the @samp{Subject} field, and @kbd{C-c
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 C-f C-c} (@code{mail-cc}) for the @samp{CC} field. These fields have
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 special motion commands because they are edited most frequently.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316 @kindex C-c C-w (Mail mode)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317 @findex mail-signature
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318 @kbd{C-c C-w} (@code{mail-signature}) adds a standard piece of text at
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319 the end of the message to say more about who you are. The text comes
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 from the file @file{.signature} in your home directory.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322 @kindex C-c C-y (Mail mode)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323 @findex mail-yank-original
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324 When you use an Rmail command to send mail from the Rmail mail reader,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325 you can use @kbd{C-c C-y} @code{mail-yank-original} inside the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
326 @samp{*mail*} buffer to insert the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
327 text of the message you are replying to. Normally Rmail indents each line
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
328 of that message four spaces and eliminates most header fields. A
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329 numeric argument specifies the number of spaces to indent. An argument
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
330 of just @kbd{C-u} says not to indent at all and not to eliminate
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
331 anything. @kbd{C-c C-y} always uses the current message from the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
332 @samp{RMAIL} buffer, so you can insert several old messages by selecting
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
333 one in @samp{RMAIL}, switching to @samp{*mail*} and yanking it, then
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
334 switching back to @samp{RMAIL} to select another.@refill
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
335
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
336 @kindex C-c C-q (Mail mode)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
337 @findex mail-fill-yanked-message
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
338 After using @kbd{C-c C-y}, you can use the command @kbd{C-c C-q}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
339 (@code{mail-fill-yanked-message}) to fill the paragraphs of the yanked
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
340 old message or messages. One use of @kbd{C-c C-q} fills all such
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
341 paragraphs, each one separately.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
342
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
343 Clicking the right mouse button in a mail buffer pops up a menu of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
344 the above commands, for easy access.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
345
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
346 @vindex mail-mode-hook
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
347 Turning on Mail mode (which @kbd{C-x m} does automatically) calls the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
348 value of @code{text-mode-hook}, if it is not void or @code{nil}, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
349 then calls the value of @code{mail-mode-hook} if that is not void or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350 @code{nil}.