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