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