Mercurial > emacs
comparison man/smtpmail.texi @ 52071:25d8603103b7
Fix typos and mark-up (from Jesper Harder <harder@ifa.au.dk>).
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Mon, 28 Jul 2003 22:41:58 +0000 |
parents | c678565b9253 |
children | 695cf19ef79e |
comparison
equal
deleted
inserted
replaced
52070:318ea3203ba5 | 52071:25d8603103b7 |
---|---|
50 | 50 |
51 @menu | 51 @menu |
52 * How Mail Works:: Brief introduction to mail concepts. | 52 * How Mail Works:: Brief introduction to mail concepts. |
53 * Emacs Speaks SMTP:: How to use the SMTP library in Emacs. | 53 * Emacs Speaks SMTP:: How to use the SMTP library in Emacs. |
54 * Authentication:: Authenticating yourself to the server. | 54 * Authentication:: Authenticating yourself to the server. |
55 * Queued delivery:: Sending mail without an Internet connection. | 55 * Queued delivery:: Sending mail without an internet connection. |
56 * Server workarounds:: Mail servers with special requirements. | 56 * Server workarounds:: Mail servers with special requirements. |
57 * Debugging:: Tracking down problems. | 57 * Debugging:: Tracking down problems. |
58 | 58 |
59 Indices | 59 Indices |
60 | 60 |
64 @node How Mail Works | 64 @node How Mail Works |
65 @chapter How Mail Works | 65 @chapter How Mail Works |
66 | 66 |
67 @cindex SMTP | 67 @cindex SMTP |
68 @cindex MTA | 68 @cindex MTA |
69 On the Internet, mail is sent from mail host to mail host using the | 69 On the internet, mail is sent from mail host to mail host using the |
70 simple mail transfer protocol (SMTP). To send and receive mail, you | 70 simple mail transfer protocol (SMTP). To send and receive mail, you |
71 must get it from and send it to a mail host. Every mail host runs a | 71 must get it from and send it to a mail host. Every mail host runs a |
72 mail transger agent (MTA) such as Exim that accepts mails and passes | 72 mail transfer agent (MTA) such as Exim that accepts mails and passes |
73 them on. The communication between a mail host and other clients does | 73 them on. The communication between a mail host and other clients does |
74 not necessarily involve SMTP, however. Here is short overview of what | 74 not necessarily involve SMTP, however. Here is short overview of what |
75 is involved. | 75 is involved. |
76 | 76 |
77 @cindex MUA | 77 @cindex MUA |
95 for your mail keeps it in a file somewhere. The messages get into the | 95 for your mail keeps it in a file somewhere. The messages get into the |
96 file by way of a mail delivery agent (MDA) such as procmail. These | 96 file by way of a mail delivery agent (MDA) such as procmail. These |
97 delivery agents often allow you to filter and munge your mails before | 97 delivery agents often allow you to filter and munge your mails before |
98 you get to see it. When your computer is that mail host, this file is | 98 you get to see it. When your computer is that mail host, this file is |
99 called a spool, and sometimes located in the directory | 99 called a spool, and sometimes located in the directory |
100 /var/spool/mail/. All your MUA has to do is read mail from the spool, | 100 @file{/var/spool/mail/}. All your MUA has to do is read mail from the |
101 then. | 101 spool, then. |
102 | 102 |
103 @cindex POP3 | 103 @cindex POP3 |
104 @cindex IMAP | 104 @cindex IMAP |
105 When your computer is not always connected to the Internet, you | 105 When your computer is not always connected to the internet, you |
106 must get the mail from the remote mail host using a protocol such as | 106 must get the mail from the remote mail host using a protocol such as |
107 POP3 or IMAP. POP3 essentially downloads all your mail from the mail | 107 POP3 or IMAP. POP3 essentially downloads all your mail from the mail |
108 host to your computer. The mail is stored in some file on your | 108 host to your computer. The mail is stored in some file on your |
109 computer, and again, all your MUA has to do is read mail from the | 109 computer, and again, all your MUA has to do is read mail from the |
110 spool. | 110 spool. |
128 | 128 |
129 Emacs includes a package for sending your mail to a SMTP server and | 129 Emacs includes a package for sending your mail to a SMTP server and |
130 have it take care of delivering it to the final destination, rather | 130 have it take care of delivering it to the final destination, rather |
131 than letting the MTA on your local system take care of it. This can | 131 than letting the MTA on your local system take care of it. This can |
132 be useful if you don't have a MTA set up on your host, or if your | 132 be useful if you don't have a MTA set up on your host, or if your |
133 machine is often disconnected from the Internet. | 133 machine is often disconnected from the internet. |
134 | 134 |
135 Sending mail via SMTP requires configuring your mail user agent | 135 Sending mail via SMTP requires configuring your mail user agent |
136 (@pxref{Mail Methods,,,emacs}) to use the SMTP library. How to do | 136 (@pxref{Mail Methods,,,emacs}) to use the SMTP library. How to do |
137 this should be described for each mail user agent; for the default | 137 this should be described for each mail user agent; for the default |
138 mail user agent the variable @code{send-mail-function} (@pxref{Mail | 138 mail user agent the variable @code{send-mail-function} (@pxref{Mail |
156 @item smtpmail-smtp-server | 156 @item smtpmail-smtp-server |
157 @vindex smtpmail-smtp-server | 157 @vindex smtpmail-smtp-server |
158 @vindex SMTPSERVER | 158 @vindex SMTPSERVER |
159 The variable @code{smtpmail-smtp-server} controls the hostname of | 159 The variable @code{smtpmail-smtp-server} controls the hostname of |
160 the server to use. It is a string with an IP address or hostname. It | 160 the server to use. It is a string with an IP address or hostname. It |
161 defaults to the contents of the @code{SMTPSERVER} environment | 161 defaults to the contents of the @env{SMTPSERVER} environment |
162 variable, or, if empty, the contents of | 162 variable, or, if empty, the contents of |
163 @code{smtpmail-default-smtp-server}. | 163 @code{smtpmail-default-smtp-server}. |
164 | 164 |
165 @item smtpmail-default-smtp-server | 165 @item smtpmail-default-smtp-server |
166 @vindex smtpmail-default-smtp-server | 166 @vindex smtpmail-default-smtp-server |
235 found, the authentication process is invoked and the credentials are | 235 found, the authentication process is invoked and the credentials are |
236 used. The hostname field follows the same format as | 236 used. The hostname field follows the same format as |
237 @code{smtpmail-smtp-server} (i.e., a string) and the port field the | 237 @code{smtpmail-smtp-server} (i.e., a string) and the port field the |
238 same format as @code{smtpmail-smtp-service} (i.e., a string or an | 238 same format as @code{smtpmail-smtp-service} (i.e., a string or an |
239 integer). The username and password fields, which either can be | 239 integer). The username and password fields, which either can be |
240 @samp{nil} to indicate that the user is queried for the value | 240 @code{nil} to indicate that the user is queried for the value |
241 interactively, should be strings with the username and password, | 241 interactively, should be strings with the username and password, |
242 respectively, information that is normally provided by system | 242 respectively, information that is normally provided by system |
243 administrators. | 243 administrators. |
244 | 244 |
245 @item smtpmail-starttls-credentials | 245 @item smtpmail-starttls-credentials |
246 @vindex smtpmail-starttls-credentials | 246 @vindex smtpmail-starttls-credentials |
247 The variable @code{smtpmail-starttls-credentials} contains a list of | 247 The variable @code{smtpmail-starttls-credentials} contains a list of |
248 tuples with hostname, port, name of file containing client key, and | 248 tuples with hostname, port, name of file containing client key, and |
249 name of file containing client certificate. The processing is similar | 249 name of file containing client certificate. The processing is similar |
250 to the previous variable. The client key and certificate may be | 250 to the previous variable. The client key and certificate may be |
251 @samp{nil} if you do not wish to use client authentication. The use | 251 @code{nil} if you do not wish to use client authentication. The use |
252 of this variable requires the @samp{starttls} external program to be | 252 of this variable requires the @samp{starttls} external program to be |
253 installed, you can get @file{starttls-*.tar.gz} from | 253 installed, you can get @file{starttls-*.tar.gz} from |
254 @uref{ftp://ftp.opaopa.org/pub/elisp/}. | 254 @uref{ftp://ftp.opaopa.org/pub/elisp/}. |
255 @end table | 255 @end table |
256 | 256 |
257 The following example illustrates what you could put in | 257 The following example illustrates what you could put in |
258 @file{~/.emacs} to enable both SASL authentication and STARTTLS. The | 258 @file{~/.emacs} to enable both SASL authentication and STARTTLS. The |
259 server name (@code{smtpmail-smtp-server}) is @var{hostname}, the | 259 server name (@code{smtpmail-smtp-server}) is @var{hostname}, the |
260 server port (@code{smtpmail-smtp-service}) is @var{port}, and the | 260 server port (@code{smtpmail-smtp-service}) is @var{port}, and the |
261 username and password are @var{username} and "@var{password} | 261 username and password are @var{username} and @var{password} |
262 respectively. | 262 respectively. |
263 | 263 |
264 @example | 264 @example |
265 ;; Authenticate using this username and password against my server. | 265 ;; Authenticate using this username and password against my server. |
266 (setq smtpmail-auth-credentials | 266 (setq smtpmail-auth-credentials |
272 | 272 |
273 @node Queued delivery | 273 @node Queued delivery |
274 @chapter Queued delivery | 274 @chapter Queued delivery |
275 | 275 |
276 @cindex Dialup connection | 276 @cindex Dialup connection |
277 If you connect to the Internet via a dialup connection, or for some | 277 If you connect to the internet via a dialup connection, or for some |
278 other reason doesn't have permanent Internet connection, sending mail | 278 other reason don't have permanent internet connection, sending mail |
279 will fail when you are not connected. The SMTP library implements | 279 will fail when you are not connected. The SMTP library implements |
280 queued delivery, and the following variable control its behaviour. | 280 queued delivery, and the following variable control its behaviour. |
281 | 281 |
282 @table @code | 282 @table @code |
283 @item smtpmail-queue-mail | 283 @item smtpmail-queue-mail |
284 @vindex smtpmail-queue-mail | 284 @vindex smtpmail-queue-mail |
285 The variable @code{smtpmail-queue-mail} controls whether a simple | 285 The variable @code{smtpmail-queue-mail} controls whether a simple |
286 off line mail sender is active. This variable is a boolean, and | 286 off line mail sender is active. This variable is a boolean, and |
287 defaults to @samp{nil} (disabled). If this is non-nil, mail is not | 287 defaults to @code{nil} (disabled). If this is non-@code{nil}, mail is |
288 sent immediately but rather queued in the directory | 288 not sent immediately but rather queued in the directory |
289 @code{smtpmail-queue-dir} and can be later sent manually by invoking | 289 @code{smtpmail-queue-dir} and can be later sent manually by invoking |
290 @code{smtpmail-send-queued-mail} (typically when you connect to the | 290 @code{smtpmail-send-queued-mail} (typically when you connect to the |
291 Internet). | 291 internet). |
292 | 292 |
293 @item smtpmail-queue-mail | 293 @item smtpmail-queue-dir |
294 @vindex smtpmail-queue-dir | 294 @vindex smtpmail-queue-dir |
295 The variable @code{smtpmail-queue-dir} specifies the name of the | 295 The variable @code{smtpmail-queue-dir} specifies the name of the |
296 directory to hold queued messages. It defaults to | 296 directory to hold queued messages. It defaults to |
297 @file{~/Mail/queued-mail/}. | 297 @file{~/Mail/queued-mail/}. |
298 @end table | 298 @end table |
299 | 299 |
300 @findex smtpmail-send-queued-mail | 300 @findex smtpmail-send-queued-mail |
301 The function @code{smtpmail-send-queued-mail} can be used to send | 301 The function @code{smtpmail-send-queued-mail} can be used to send |
302 any queued mail when @code{smtpmail-queue-mail} is enabled. It is | 302 any queued mail when @code{smtpmail-queue-mail} is enabled. It is |
303 typically invoked interactively with @kbd{M-x RET | 303 typically invoked interactively with @kbd{M-x |
304 smtpmail-send-queued-mail RET} when you are connected to the Internet. | 304 smtpmail-send-queued-mail RET} when you are connected to the internet. |
305 | 305 |
306 @node Server workarounds | 306 @node Server workarounds |
307 @chapter Server workarounds | 307 @chapter Server workarounds |
308 | 308 |
309 Some SMTP servers have special requirements. The following variables | 309 Some SMTP servers have special requirements. The following variables |