annotate man/smtpmail.texi @ 50633:956b2eed924d

*** empty log message ***
author Miles Bader <miles@gnu.org>
date Fri, 18 Apr 2003 01:23:43 +0000
parents f2da717b5ff1
children c678565b9253
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
49924
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
1 \input texinfo @c -*-texinfo-*-
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
2 @setfilename ../info/smtpmail
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
3 @settitle Emacs SMTP Library
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
4 @syncodeindex vr fn
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
5 @copying
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
6 Copyright @copyright{} 2003 Free Software Foundation, Inc.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
7
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
8 @quotation
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
9 Permission is granted to copy, distribute and/or modify this document
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
10 under the terms of the GNU Free Documentation License, Version 1.1 or
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
11 any later version published by the Free Software Foundation; with the
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
12 Invariant Sections being ``The GNU Manifesto'', ``Distribution'' and
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
13 ``GNU GENERAL PUBLIC LICENSE'', with the Front-Cover texts being ``A GNU
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
14 Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
15 license is included in the section entitled ``GNU Free Documentation
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
16 License'' in the Emacs manual.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
17
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
18 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
19 this GNU Manual, like GNU software. Copies published by the Free
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
20 Software Foundation raise funds for GNU development.''
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
21
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
22 This document is part of a collection distributed under the GNU Free
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
23 Documentation License. If you want to distribute this document
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
24 separately from the collection, you can do so by adding a copy of the
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
25 license to the document, as described in section 6 of the license.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
26 @end quotation
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
27 @end copying
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
28
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
29 @dircategory Emacs
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
30 @direntry
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
31 * Emacs SMTP Library: (smtpmail). Emacs library for sending mail via SMTP.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
32 @end direntry
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
33
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
34 @titlepage
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
35 @title{Emacs SMTP Library}
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
36 @subtitle{An Emacs package for sending mail via SMTP}
49937
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
37 @author{Simon Josefsson, Alex Schroeder}
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
38 @page
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
39 @vskip 0pt plus 1filll
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
40 @insertcopying
49924
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
41 @end titlepage
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
42
49937
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
43 @contents
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
44
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
45 @ifnottex
49924
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
46 @node Top
49937
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
47 @top Emacs SMTP Library
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
48
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
49 @insertcopying
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
50 @end ifnottex
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
51
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
52 @menu
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
53 * How Mail Works:: Brief introduction to mail concepts.
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
54 * Emacs Speaks SMTP:: How to use the SMTP library in Emacs.
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
55 * Authentication:: Authenticating yourself to the server.
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
56 * Queued delivery:: Sending mail without an Internet connection.
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
57 * Server workarounds:: Mail servers with special requirements.
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
58 * Debugging:: Tracking down problems.
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
59
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
60 Indices
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
61
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
62 * Index:: Index over variables and functions.
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
63 @end menu
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
64
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
65 @node How Mail Works
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
66 @chapter How Mail Works
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
67
49924
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
68 @cindex SMTP
49937
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
69 @cindex MTA
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
70 On the Internet, mail is sent from mail host to mail host using the
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
71 simple mail transfer protocol (SMTP). To send and receive mail, you
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
72 must get it from and send it to a mail host. Every mail host runs a
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
73 mail transger agent (MTA) such as Exim that accepts mails and passes
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
74 them on. The communication between a mail host and other clients does
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
75 not necessarily involve SMTP, however. Here is short overview of what
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
76 is involved.
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
77
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
78 @cindex MUA
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
79 The mail program --- also called a mail user agent (MUA) ---
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
80 usually sends outgoing mail to a mail host. When your computer is
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
81 permanently connected to the internet, it might even be a mail host
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
82 itself. In this case, the MUA will pipe mail to the
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
83 @file{/usr/lib/sendmail} application. It will take care of your mail
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
84 and pass it on to the next mail host.
49924
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
85
49937
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
86 @cindex ISP
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
87 When you are only connected to the internet from time to time, your
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
88 internet service provider (ISP) has probably told you which mail host
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
89 to use. You must configure your MUA to use that mail host. Since you
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
90 are reading this manual, you probably want to configure Emacs to use
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
91 SMTP to send mail to that mail host. More on that in the next
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
92 section.
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
93
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
94 @cindex MDA
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
95 Things are different when reading mail. The mail host responsible
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
96 for your mail keeps it in a file somewhere. The messages get into the
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
97 file by way of a mail delivery agent (MDA) such as procmail. These
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
98 delivery agents often allow you to filter and munge your mails before
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
99 you get to see it. When your computer is that mail host, this file is
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
100 called a spool, and sometimes located in the directory
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
101 /var/spool/mail/. All your MUA has to do is read mail from the spool,
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
102 then.
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
103
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
104 @cindex POP3
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
105 @cindex IMAP
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
106 When your computer is not always connected to the Internet, you
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
107 must get the mail from the remote mail host using a protocol such as
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
108 POP3 or IMAP. POP3 essentially downloads all your mail from the mail
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
109 host to your computer. The mail is stored in some file on your
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
110 computer, and again, all your MUA has to do is read mail from the
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
111 spool.
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
112
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
113 When you read mail from various machines, downloading mail from the
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
114 mail host to your current machine is not convenient. In that case,
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
115 you will probably want to use the IMAP protocol. Your mail is kept on
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
116 the mail host, and you can read it while you are connected via IMAP to
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
117 the mail host.
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
118
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
119 @cindex Webmail
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
120 So how does reading mail via the web work, you ask. In that case,
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
121 the web interface just allows you to remote-control a MUA on the web
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
122 host. Whether the web host is also a mail host, and how all the
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
123 pieces interact is completely irrelevant. You usually cannot use
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
124 Emacs to read mail via the web, unless you use software that parses
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
125 the ever-changing HTML of the web interface.
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
126
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
127 @node Emacs Speaks SMTP
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
128 @chapter Emacs Speaks SMTP
49924
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
129
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
130 Emacs includes a package for sending your mail to a SMTP server and
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
131 have it take care of delivering it to the final destination, rather
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
132 than letting the MTA on your local system take care of it. This can
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
133 be useful if you don't have a MTA set up on your host, or if your
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
134 machine is often disconnected from the Internet.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
135
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
136 Sending mail via SMTP requires configuring your mail user agent
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
137 (@pxref{Mail Methods,,,emacs}) to use the SMTP library. How to do
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
138 this should be described for each mail user agent; for the default
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
139 mail user agent the variable @code{send-mail-function} (@pxref{Mail
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
140 Sending,,,emacs}) is used; for the Message and Gnus user agents the
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
141 variable @code{message-send-mail-function} (@pxref{Mail
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
142 Variables,,,message}) is used.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
143
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
144 @example
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
145 ;; If you use the default mail user agent.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
146 (setq send-mail-function 'smtpmail-send-it)
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
147 ;; If you use Message or Gnus.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
148 (setq message-send-mail-function 'smtpmail-send-it)
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
149 @end example
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
150
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
151 Before using SMTP you must find out the hostname of the SMTP server
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
152 to use. Your system administrator should provide you with this
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
153 information, but often it is the same as the server you receive mail
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
154 from.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
155
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
156 @table @code
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
157 @item smtpmail-smtp-server
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
158 @vindex smtpmail-smtp-server
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
159 @vindex SMTPSERVER
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
160 The variable @code{smtpmail-smtp-server} controls the hostname of
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
161 the server to use. It is a string with an IP address or hostname. It
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
162 defaults to the contents of the @code{SMTPSERVER} environment
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
163 variable, or, if empty, the contents of
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
164 @code{smtpmail-default-smtp-server}.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
165
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
166 @item smtpmail-default-smtp-server
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
167 @vindex smtpmail-default-smtp-server
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
168 The variable @code{smtpmail-default-smtp-server} controls the
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
169 default hostname of the server to use. It is a string with an IP
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
170 address or hostname. It must be set before the SMTP library is
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
171 loaded. It has no effect if set after the SMTP library has been
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
172 loaded, or if @code{smtpmail-smtp-server} is defined. It is usually
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
173 set by system administrators in a site wide initialization file.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
174 @end table
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
175
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
176 The following example illustrates what you could put in
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
177 @file{~/.emacs} to set the SMTP server name.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
178
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
179 @example
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
180 ;; Send mail using SMTP via mail.example.org.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
181 (setq smtpmail-smtp-server "mail.example.org")
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
182 @end example
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
183
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
184 @cindex Mail Submission
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
185 SMTP is normally used on the registered ``smtp'' TCP service port 25.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
186 Some environments use SMTP in ``Mail Submission'' mode, which uses
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
187 port 587. Using other ports is not uncommon, either for security by
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
188 obscurity purposes, port forwarding, or otherwise.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
189
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
190 @table @code
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
191 @item smtpmail-smtp-service
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
192 @vindex smtpmail-smtp-service
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
193 The variable @code{smtpmail-smtp-service} controls the port on the
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
194 server to contact. It is either a string, in which case it will be
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
195 translated into an integer using system calls, or an integer.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
196 @end table
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
197
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
198 The following example illustrates what you could put in
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
199 @file{~/.emacs} to set the SMTP service port.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
200
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
201 @example
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
202 ;; Send mail using SMTP on the mail submission port 587.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
203 (setq smtpmail-smtp-service 587)
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
204 @end example
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
205
49937
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
206 @node Authentication
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
207 @chapter Authentication
49924
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
208
49937
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
209 @cindex SASL
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
210 @cindex CRAM-MD5
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
211 @cindex PLAIN
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
212 @cindex LOGIN
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
213 @cindex STARTTLS
49924
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
214 Many environments require SMTP clients to authenticate themselves
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
215 before they are allowed to route mail via a server. The two following
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
216 variables contains the authentication information needed for this.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
217 The first variable, @code{smtpmail-auth-credentials}, instructs the
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
218 SMTP library to use a SASL authentication step, currently only the
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
219 CRAM-MD5, PLAIN and LOGIN-MD5 mechanisms are supported and will be
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
220 selected in that order if the server supports them. The second
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
221 variable, @code{smtpmail-starttls-credentials}, instructs the SMTP
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
222 library to connect to the server using STARTTLS. This means the
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
223 protocol exchange can be integrity protected and confidential by using
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
224 TLS, and optionally also authentication of the client. It is common
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
225 to use both these mechanisms, e.g., to use STARTTLS to achieve
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
226 integrity and confidentiality and then use SASL for client
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
227 authentication.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
228
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
229 @table @code
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
230 @item smtpmail-auth-credentials
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
231 @vindex smtpmail-auth-credentials
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
232 The variable @code{smtpmail-auth-credentials} contains a list of
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
233 hostname, port, username and password tuples. When the SMTP library
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
234 connects to a host on a certain port, this variable is searched to
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
235 find a matching entry for that hostname and port. If an entry is
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
236 found, the authentication process is invoked and the credentials are
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
237 used. The hostname field follows the same format as
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
238 @code{smtpmail-smtp-server} (i.e., a string) and the port field the
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
239 same format as @code{smtpmail-smtp-service} (i.e., a string or an
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
240 integer). The username and password fields, which either can be
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
241 @samp{nil} to indicate that the user is queried for the value
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
242 interactively, should be strings with the username and password,
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
243 respectively, information that is normally provided by system
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
244 administrators.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
245
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
246 @item smtpmail-starttls-credentials
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
247 @vindex smtpmail-starttls-credentials
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
248 The variable @code{smtpmail-starttls-credentials} contains a list of
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
249 tuples with hostname, port, name of file containing client key, and
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
250 name of file containing client certificate. The processing is similar
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
251 to the previous variable. The client key and certificate may be
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
252 @samp{nil} if you do not wish to use client authentication. The use
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
253 of this variable requires the @samp{starttls} external program to be
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
254 installed, you can get @file{starttls-*.tar.gz} from
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
255 @uref{ftp://ftp.opaopa.org/pub/elisp/}.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
256 @end table
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
257
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
258 The following example illustrates what you could put in
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
259 @file{~/.emacs} to enable both SASL authentication and STARTTLS. The
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
260 server name (@code{smtpmail-smtp-server}) is @var{hostname}, the
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
261 server port (@code{smtpmail-smtp-service}) is @var{port}, and the
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
262 username and password are @var{username} and "@var{password}
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
263 respectively.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
264
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
265 @example
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
266 ;; Authenticate using this username and password against my server.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
267 (setq smtpmail-auth-credentials
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
268 '(("@var{hostname}" "@var{port}" "@var{username}" "@var{password}")))
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
269 ;; Use STARTTLS without authentication against the server.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
270 (setq smtpmail-starttls-credentials
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
271 '(("@var{hostname}" "@var{port}" nil nil)))
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
272 @end example
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
273
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
274 @node Queued delivery
49937
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
275 @chapter Queued delivery
49924
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
276
49937
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
277 @cindex Dialup connection
49924
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
278 If you connect to the Internet via a dialup connection, or for some
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
279 other reason doesn't have permanent Internet connection, sending mail
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
280 will fail when you are not connected. The SMTP library implements
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
281 queued delivery, and the following variable control its behaviour.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
282
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
283 @table @code
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
284 @item smtpmail-queue-mail
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
285 @vindex smtpmail-queue-mail
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
286 The variable @code{smtpmail-queue-mail} controls whether a simple
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
287 off line mail sender is active. This variable is a boolean, and
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
288 defaults to @samp{nil} (disabled). If this is non-nil, mail is not
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
289 sent immediately but rather queued in the directory
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
290 @code{smtpmail-queue-dir} and can be later sent manually by invoking
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
291 @code{smtpmail-send-queued-mail} (typically when you connect to the
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
292 Internet).
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
293
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
294 @item smtpmail-queue-mail
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
295 @vindex smtpmail-queue-dir
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
296 The variable @code{smtpmail-queue-dir} specifies the name of the
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
297 directory to hold queued messages. It defaults to
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
298 @file{~/Mail/queued-mail/}.
49938
Simon Josefsson <jas@extundo.com>
parents: 49937
diff changeset
299 @end table
49924
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
300
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
301 @findex smtpmail-send-queued-mail
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
302 The function @code{smtpmail-send-queued-mail} can be used to send
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
303 any queued mail when @code{smtpmail-queue-mail} is enabled. It is
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
304 typically invoked interactively with @kbd{M-x RET
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
305 smtpmail-send-queued-mail RET} when you are connected to the Internet.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
306
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
307 @node Server workarounds
49937
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
308 @chapter Server workarounds
49924
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
309
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
310 Some SMTP servers have special requirements. The following variables
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
311 implement support for common requirements.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
312
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
313 @table @code
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
314
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
315 @item smtpmail-local-domain
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
316 @vindex smtpmail-local-domain
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
317 The variable @code{smtpmail-local-domain} controls the hostname sent
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
318 in the first @code{EHLO} or @code{HELO} command sent to the server.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
319 It should only be set if the @code{system-name} function returns a
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
320 name that isn't accepted by the server. Do not set this variable
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
321 unless your server complains.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
322
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
323 @item smtpmail-sendto-domain
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
324 @vindex smtpmail-sendto-domain
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
325 The variable @code{smtpmail-sendto-domain} makes the SMTP library
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
326 add @samp{@@} and the specified value to recipients specified in the
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
327 message when they are sent using the @code{RCPT TO} command. Some
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
328 configurations of sendmail requires this behaviour. Don't bother to
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
329 set this unless you have get an error like:
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
330
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
331 @example
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
332 Sending failed; SMTP protocol error
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
333 @end example
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
334
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
335 when sending mail, and the debug buffer (@pxref{Debugging})) contains
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
336 an error such as:
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
337
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
338 @example
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
339 RCPT TO: @var{someone}
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
340 501 @var{someone}: recipient address must contain a domain
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
341 @end example
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
342
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
343 @end table
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
344
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
345
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
346 @node Debugging
49937
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
347 @chapter Debugging
49924
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
348
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
349 Sometimes delivery fails, often with the generic error message
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
350 @samp{Sending failed; SMTP protocol error}. Enabling one or both of
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
351 the following variables and inspecting a trace buffer will often give
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
352 clues to the reason for the error.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
353
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
354 @table @code
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
355
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
356 @item smtpmail-debug-info
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
357 @vindex smtpmail-debug-info
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
358 The variable @code{smtpmail-debug-info} controls whether to print
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
359 the SMTP protocol exchange in the minibuffer, and retain the entire
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
360 exchange in a buffer @samp{*trace of SMTP session to @var{server}*},
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
361 where @var{server} is the name of the mail server to which you send
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
362 mail.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
363
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
364 @item smtpmail-debug-verb
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
365 @vindex smtpmail-debug-verb
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
366 The variable @code{smtpmail-debug-verb} controls whether to send the
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
367 @code{VERB} token to the server. The @code{VERB} server instructs the
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
368 server to be more verbose, and often also to attempt final delivery
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
369 while your SMTP session is still running. It is usually only useful
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
370 together with @code{smtpmail-debug-info}. Note that this may cause
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
371 mail delivery to take considerable time if the final destination
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
372 cannot accept mail.
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
373
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
374 @end table
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
375
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
376 @node Index
49937
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
377 @chapter Index
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
378
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
379 @section Concept Index
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
380
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
381 @printindex cp
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
382
49924
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
383 @section Function and Variable Index
49937
Simon Josefsson <jas@extundo.com>
parents: 49924
diff changeset
384
49924
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
385 @printindex fn
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
386
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
387 @contents
99fd2891ce11 Manual for smtpmail.el.
Simon Josefsson <jas@extundo.com>
parents:
diff changeset
388 @bye