@@ -6,23 +6,27 @@ \section{\module{imaplib} ---
66\moduleauthor {Piers Lauder}{
[email protected] }
77\sectionauthor {Piers Lauder}{
[email protected] }
88
9- % Based on HTML documentation by Piers Lauder <[email protected] >;9+ % Based on HTML documentation by Piers Lauder
10+ 1011% converted by Fred L. Drake, Jr. <[email protected] >.1112% Revised by ESR, January 2000.
1213% Changes for IMAP4_SSL by Tino Lange <[email protected] >, March 2002 13- % Changes for IMAP4_stream by Piers Lauder <[email protected] >, November 2002 14+ % Changes for IMAP4_stream by Piers Lauder
15+ % <[email protected] >, November 20021416
1517\indexii {IMAP4}{protocol}
1618\indexii {IMAP4_SSL}{protocol}
1719\indexii {IMAP4_stream}{protocol}
1820
19- This module defines three classes, \class {IMAP4}, \class {IMAP4_SSL} and \class {IMAP4_stream}, which encapsulate a
21+ This module defines three classes, \class {IMAP4}, \class {IMAP4_SSL}
22+ and \class {IMAP4_stream}, which encapsulate a
2023connection to an IMAP4 server and implement a large subset of the
2124IMAP4rev1 client protocol as defined in \rfc {2060}. It is backward
2225compatible with IMAP4 (\rfc {1730}) servers, but note that the
2326\samp {STATUS} command is not supported in IMAP4.
2427
25- Three classes are provided by the \module {imaplib} module, \class {IMAP4} is the base class:
28+ Three classes are provided by the \module {imaplib} module,
29+ \class {IMAP4} is the base class:
2630
2731\begin {classdesc }{IMAP4}{\optional {host\optional {, port}}}
2832This class implements the actual IMAP4 protocol. The connection is
@@ -47,27 +51,32 @@ \section{\module{imaplib} ---
4751\end {excdesc }
4852
4953\begin {excdesc }{IMAP4.readonly}
50- This exception is raised when a writable mailbox has its status changed by the server. This is a
51- sub-class of \exception {IMAP4.error}. Some other client now has write permission,
52- and the mailbox will need to be re-opened to re-obtain write permission.
54+ This exception is raised when a writable mailbox has its status
55+ changed by the server. This is a sub-class of
56+ \exception {IMAP4.error}. Some other client now has write permission,
57+ and the mailbox will need to be re-opened to re-obtain write
58+ permission.
5359\end {excdesc }
5460
5561There's also a subclass for secure connections:
5662
57- \begin {classdesc }{IMAP4_SSL}{\optional {host\optional {, port\optional {, keyfile\optional {, certfile}}}}}
58- This is a subclass derived from \class {IMAP4} that connects over an SSL encrypted socket
59- (to use this class you need a socket module that was compiled with SSL support).
60- If \var {host} is not specified, \code {''} (the local host) is used.
61- If \var {port} is omitted, the standard IMAP4-over-SSL port (993) is used.
62- \var {keyfile} and \var {certfile} are also optional - they can contain a PEM formatted
63- private key and certificate chain file for the SSL connection.
63+ \begin {classdesc }{IMAP4_SSL}{\optional {host\optional {, port\optional {,
64+ keyfile\optional {, certfile}}}}}
65+ This is a subclass derived from \class {IMAP4} that connects over an
66+ SSL encrypted socket (to use this class you need a socket module that
67+ was compiled with SSL support). If \var {host} is not specified,
68+ \code {''} (the local host) is used. If \var {port} is omitted, the
69+ standard IMAP4-over-SSL port (993) is used. \var {keyfile} and
70+ \var {certfile} are also optional - they can contain a PEM formatted
71+ private key and certificate chain file for the SSL connection.
6472\end {classdesc }
6573
6674The second subclass allows for connections created by a child process:
6775
6876\begin {classdesc }{IMAP4_stream}{command}
6977This is a subclass derived from \class {IMAP4} that connects
70- to the \code {stdin/stdout} file descriptors created by passing \var {command} to \code {os.popen2()}.
78+ to the \code {stdin/stdout} file descriptors created by passing
79+ \var {command} to \code {os.popen2()}.
7180\versionadded {2.3}
7281\end {classdesc }
7382
@@ -144,9 +153,9 @@ \subsection{IMAP4 Objects \label{imap4-objects}}
144153\begin {methoddesc }{authenticate}{mechanism, authobject}
145154 Authenticate command --- requires response processing.
146155
147- \var {mechanism} specifies which authentication mechanism is to
148- be used - it should appear in the instance variable \code {capabilities} in the
149- form \code {AUTH=mechanism}.
156+ \var {mechanism} specifies which authentication mechanism is to be
157+ used - it should appear in the instance variable \code {capabilities}
158+ in the form \code {AUTH=mechanism}.
150159
151160 \var {authobject} must be a callable object:
152161
@@ -231,8 +240,9 @@ \subsection{IMAP4 Objects \label{imap4-objects}}
231240\end {methoddesc }
232241
233242\begin {methoddesc }{login_cram_md5}{user, password}
234- Force use of \samp {CRAM-MD5} authentication when identifying the client to protect the password.
235- Will only work if the server \samp {CAPABILITY} response includes the phrase \samp {AUTH=CRAM-MD5}.
243+ Force use of \samp {CRAM-MD5} authentication when identifying the
244+ client to protect the password. Will only work if the server
245+ \samp {CAPABILITY} response includes the phrase \samp {AUTH=CRAM-MD5}.
236246\versionadded {2.3}
237247\end {methoddesc }
238248
@@ -264,7 +274,8 @@ \subsection{IMAP4 Objects \label{imap4-objects}}
264274\begin {methoddesc }{open}{host, port}
265275 Opens socket to \var {port} at \var {host}.
266276 The connection objects established by this method
267- will be used in the \code {read}, \code {readline}, \code {send}, and \code {shutdown} methods.
277+ will be used in the \code {read}, \code {readline}, \code {send}, and
278+ \code {shutdown} methods.
268279 You may override this method.
269280\end {methoddesc }
270281
@@ -355,16 +366,17 @@ \subsection{IMAP4 Objects \label{imap4-objects}}
355366\end {methoddesc }
356367
357368\begin {methoddesc }{sort}{sort_criteria, charset, search_criterion\optional {, ...}}
358- The \code {sort} command is a variant of \code {search} with sorting semantics for
359- the results. Returned data contains a space
360- separated list of matching message numbers.
369+ The \code {sort} command is a variant of \code {search} with sorting
370+ semantics for the results. Returned data contains a space separated
371+ list of matching message numbers.
361372
362373 Sort has two arguments before the \var {search_criterion}
363- argument(s); a parenthesized list of \var {sort_criteria}, and the searching \var {charset}.
364- Note that unlike \code {search}, the searching \var {charset} argument is mandatory.
365- There is also a \code {uid sort} command which corresponds to \code {sort} the way
366- that \code {uid search} corresponds to \code {search}.
367- The \code {sort} command first searches the mailbox for messages that
374+ argument(s); a parenthesized list of \var {sort_criteria}, and the
375+ searching \var {charset}. Note that unlike \code {search}, the
376+ searching \var {charset} argument is mandatory. There is also a
377+ \code {uid sort} command which corresponds to \code {sort} the way
378+ that \code {uid search} corresponds to \code {search}. The
379+ \code {sort} command first searches the mailbox for messages that
368380 match the given searching criteria using the charset argument for
369381 the interpretation of strings in the searching criteria. It then
370382 returns the numbers of matching messages.
@@ -384,24 +396,25 @@ \subsection{IMAP4 Objects \label{imap4-objects}}
384396 Subscribe to new mailbox.
385397\end {methoddesc }
386398
387- \begin {methoddesc }{thread}{threading_algorithm, charset, search_criterion\optional {, ...}}
388- The \code {thread} command is a variant of \code {search} with threading semantics for
389- the results. Returned data contains a space
399+ \begin {methoddesc }{thread}{threading_algorithm, charset,
400+ search_criterion\optional {, ...}}
401+ The \code {thread} command is a variant of \code {search} with
402+ threading semantics for the results. Returned data contains a space
390403 separated list of thread members.
391404
392- Thread members consist of zero or more messages numbers, delimited by spaces,
393- indicating successive parent and child.
405+ Thread members consist of zero or more messages numbers, delimited
406+ by spaces, indicating successive parent and child.
394407
395408 Thread has two arguments before the \var {search_criterion}
396- argument(s); a \var {threading_algorithm}, and the searching \var {charset}.
397- Note that unlike \code {search}, the searching \var {charset} argument is mandatory.
398- There is also a \code {uid thread} command which corresponds to \code {thread} the way
399- that \code {uid search} corresponds to \code {search}.
400- The \code {thread} command first searches the mailbox for messages that
401- match the given searching criteria using the charset argument for
402- the interpretation of strings in the searching criteria. It thren
403- returns the matching messages threaded according to the specified
404- threading algorithm.
409+ argument(s); a \var {threading_algorithm}, and the searching
410+ \var {charset}. Note that unlike \code {search}, the searching
411+ \var {charset} argument is mandatory. There is also a \code {uid
412+ thread} command which corresponds to \code {thread} the way that
413+ \code {uid search} corresponds to \code {search}. The \code {thread}
414+ command first searches the mailbox for messages that match the given
415+ searching criteria using the charset argument for the interpretation
416+ of strings in the searching criteria. It thren returns the matching
417+ messages threaded according to the specified threading algorithm.
405418
406419 This is an \samp {IMAP4rev1} extension command. \versionadded {2.4}
407420\end {methoddesc }
0 commit comments