Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
63a5d0b1
Kaydet (Commit)
63a5d0b1
authored
Tem 30, 2004
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
re-wrap paragraphs containing long lines
üst
69013d07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
43 deletions
+56
-43
libimaplib.tex
Doc/lib/libimaplib.tex
+56
-43
No files found.
Doc/lib/libimaplib.tex
Dosyayı görüntüle @
63a5d0b1
...
@@ -6,23 +6,27 @@
...
@@ -6,23 +6,27 @@
\moduleauthor
{
Piers Lauder
}{
piers@communitysolutions.com.au
}
\moduleauthor
{
Piers Lauder
}{
piers@communitysolutions.com.au
}
\sectionauthor
{
Piers Lauder
}{
piers@communitysolutions.com.au
}
\sectionauthor
{
Piers Lauder
}{
piers@communitysolutions.com.au
}
% Based on HTML documentation by Piers Lauder <piers@communitysolutions.com.au>;
% Based on HTML documentation by Piers Lauder
% <piers@communitysolutions.com.au>;
% converted by Fred L. Drake, Jr. <fdrake@acm.org>.
% converted by Fred L. Drake, Jr. <fdrake@acm.org>.
% Revised by ESR, January 2000.
% Revised by ESR, January 2000.
% Changes for IMAP4_SSL by Tino Lange <Tino.Lange@isg.de>, March 2002
% Changes for IMAP4_SSL by Tino Lange <Tino.Lange@isg.de>, March 2002
% Changes for IMAP4_stream by Piers Lauder <piers@communitysolutions.com.au>, November 2002
% Changes for IMAP4_stream by Piers Lauder
% <piers@communitysolutions.com.au>, November 2002
\indexii
{
IMAP4
}{
protocol
}
\indexii
{
IMAP4
}{
protocol
}
\indexii
{
IMAP4
_
SSL
}{
protocol
}
\indexii
{
IMAP4
_
SSL
}{
protocol
}
\indexii
{
IMAP4
_
stream
}{
protocol
}
\indexii
{
IMAP4
_
stream
}{
protocol
}
This module defines three classes,
\class
{
IMAP4
}
,
\class
{
IMAP4
_
SSL
}
and
\class
{
IMAP4
_
stream
}
, which encapsulate a
This module defines three classes,
\class
{
IMAP4
}
,
\class
{
IMAP4
_
SSL
}
and
\class
{
IMAP4
_
stream
}
, which encapsulate a
connection to an IMAP4 server and implement a large subset of the
connection to an IMAP4 server and implement a large subset of the
IMAP4rev1 client protocol as defined in
\rfc
{
2060
}
. It is backward
IMAP4rev1 client protocol as defined in
\rfc
{
2060
}
. It is backward
compatible with IMAP4 (
\rfc
{
1730
}
) servers, but note that the
compatible with IMAP4 (
\rfc
{
1730
}
) servers, but note that the
\samp
{
STATUS
}
command is not supported in IMAP4.
\samp
{
STATUS
}
command is not supported in IMAP4.
Three classes are provided by the
\module
{
imaplib
}
module,
\class
{
IMAP4
}
is the base class:
Three classes are provided by the
\module
{
imaplib
}
module,
\class
{
IMAP4
}
is the base class:
\begin{classdesc}
{
IMAP4
}{
\optional
{
host
\optional
{
, port
}}}
\begin{classdesc}
{
IMAP4
}{
\optional
{
host
\optional
{
, port
}}}
This class implements the actual IMAP4 protocol. The connection is
This class implements the actual IMAP4 protocol. The connection is
...
@@ -47,27 +51,32 @@ exception.
...
@@ -47,27 +51,32 @@ exception.
\end{excdesc}
\end{excdesc}
\begin{excdesc}
{
IMAP4.readonly
}
\begin{excdesc}
{
IMAP4.readonly
}
This exception is raised when a writable mailbox has its status changed by the server. This is a
This exception is raised when a writable mailbox has its status
sub-class of
\exception
{
IMAP4.error
}
. Some other client now has write permission,
changed by the server. This is a sub-class of
and the mailbox will need to be re-opened to re-obtain write permission.
\exception
{
IMAP4.error
}
. Some other client now has write permission,
and the mailbox will need to be re-opened to re-obtain write
permission.
\end{excdesc}
\end{excdesc}
There's also a subclass for secure connections:
There's also a subclass for secure connections:
\begin{classdesc}
{
IMAP4
_
SSL
}{
\optional
{
host
\optional
{
, port
\optional
{
, keyfile
\optional
{
, certfile
}}}}}
\begin{classdesc}
{
IMAP4
_
SSL
}{
\optional
{
host
\optional
{
, port
\optional
{
,
This is a subclass derived from
\class
{
IMAP4
}
that connects over an SSL encrypted socket
keyfile
\optional
{
, certfile
}}}}}
(to use this class you need a socket module that was compiled with SSL support).
This is a subclass derived from
\class
{
IMAP4
}
that connects over an
If
\var
{
host
}
is not specified,
\code
{
''
}
(the local host) is used.
SSL encrypted socket (to use this class you need a socket module that
If
\var
{
port
}
is omitted, the standard IMAP4-over-SSL port (993) is used.
was compiled with SSL support). If
\var
{
host
}
is not specified,
\var
{
keyfile
}
and
\var
{
certfile
}
are also optional - they can contain a PEM formatted
\code
{
''
}
(the local host) is used. If
\var
{
port
}
is omitted, the
private key and certificate chain file for the SSL connection.
standard IMAP4-over-SSL port (993) is used.
\var
{
keyfile
}
and
\var
{
certfile
}
are also optional - they can contain a PEM formatted
private key and certificate chain file for the SSL connection.
\end{classdesc}
\end{classdesc}
The second subclass allows for connections created by a child process:
The second subclass allows for connections created by a child process:
\begin{classdesc}
{
IMAP4
_
stream
}{
command
}
\begin{classdesc}
{
IMAP4
_
stream
}{
command
}
This is a subclass derived from
\class
{
IMAP4
}
that connects
This is a subclass derived from
\class
{
IMAP4
}
that connects
to the
\code
{
stdin/stdout
}
file descriptors created by passing
\var
{
command
}
to
\code
{
os.popen2()
}
.
to the
\code
{
stdin/stdout
}
file descriptors created by passing
\var
{
command
}
to
\code
{
os.popen2()
}
.
\versionadded
{
2.3
}
\versionadded
{
2.3
}
\end{classdesc}
\end{classdesc}
...
@@ -144,9 +153,9 @@ An \class{IMAP4} instance has the following methods:
...
@@ -144,9 +153,9 @@ An \class{IMAP4} instance has the following methods:
\begin{methoddesc}
{
authenticate
}{
mechanism, authobject
}
\begin{methoddesc}
{
authenticate
}{
mechanism, authobject
}
Authenticate command --- requires response processing.
Authenticate command --- requires response processing.
\var
{
mechanism
}
specifies which authentication mechanism is to
\var
{
mechanism
}
specifies which authentication mechanism is to
be
be used - it should appear in the instance variable
\code
{
capabilities
}
in the
used - it should appear in the instance variable
\code
{
capabilities
}
form
\code
{
AUTH=mechanism
}
.
in the
form
\code
{
AUTH=mechanism
}
.
\var
{
authobject
}
must be a callable object:
\var
{
authobject
}
must be a callable object:
...
@@ -231,8 +240,9 @@ data = authobject(response)
...
@@ -231,8 +240,9 @@ data = authobject(response)
\end{methoddesc}
\end{methoddesc}
\begin{methoddesc}
{
login
_
cram
_
md5
}{
user, password
}
\begin{methoddesc}
{
login
_
cram
_
md5
}{
user, password
}
Force use of
\samp
{
CRAM-MD5
}
authentication when identifying the client to protect the password.
Force use of
\samp
{
CRAM-MD5
}
authentication when identifying the
Will only work if the server
\samp
{
CAPABILITY
}
response includes the phrase
\samp
{
AUTH=CRAM-MD5
}
.
client to protect the password. Will only work if the server
\samp
{
CAPABILITY
}
response includes the phrase
\samp
{
AUTH=CRAM-MD5
}
.
\versionadded
{
2.3
}
\versionadded
{
2.3
}
\end{methoddesc}
\end{methoddesc}
...
@@ -264,7 +274,8 @@ data = authobject(response)
...
@@ -264,7 +274,8 @@ data = authobject(response)
\begin{methoddesc}
{
open
}{
host, port
}
\begin{methoddesc}
{
open
}{
host, port
}
Opens socket to
\var
{
port
}
at
\var
{
host
}
.
Opens socket to
\var
{
port
}
at
\var
{
host
}
.
The connection objects established by this method
The connection objects established by this method
will be used in the
\code
{
read
}
,
\code
{
readline
}
,
\code
{
send
}
, and
\code
{
shutdown
}
methods.
will be used in the
\code
{
read
}
,
\code
{
readline
}
,
\code
{
send
}
, and
\code
{
shutdown
}
methods.
You may override this method.
You may override this method.
\end{methoddesc}
\end{methoddesc}
...
@@ -355,16 +366,17 @@ msgnums = M.search(None, '(FROM "LDJ")')
...
@@ -355,16 +366,17 @@ msgnums = M.search(None, '(FROM "LDJ")')
\end{methoddesc}
\end{methoddesc}
\begin{methoddesc}
{
sort
}{
sort
_
criteria, charset, search
_
criterion
\optional
{
, ...
}}
\begin{methoddesc}
{
sort
}{
sort
_
criteria, charset, search
_
criterion
\optional
{
, ...
}}
The
\code
{
sort
}
command is a variant of
\code
{
search
}
with sorting
semantics for
The
\code
{
sort
}
command is a variant of
\code
{
search
}
with sorting
the results. Returned data contains a space
semantics for the results. Returned data contains a space separated
separated
list of matching message numbers.
list of matching message numbers.
Sort has two arguments before the
\var
{
search
_
criterion
}
Sort has two arguments before the
\var
{
search
_
criterion
}
argument(s); a parenthesized list of
\var
{
sort
_
criteria
}
, and the searching
\var
{
charset
}
.
argument(s); a parenthesized list of
\var
{
sort
_
criteria
}
, and the
Note that unlike
\code
{
search
}
, the searching
\var
{
charset
}
argument is mandatory.
searching
\var
{
charset
}
. Note that unlike
\code
{
search
}
, the
There is also a
\code
{
uid sort
}
command which corresponds to
\code
{
sort
}
the way
searching
\var
{
charset
}
argument is mandatory. There is also a
that
\code
{
uid search
}
corresponds to
\code
{
search
}
.
\code
{
uid sort
}
command which corresponds to
\code
{
sort
}
the way
The
\code
{
sort
}
command first searches the mailbox for messages that
that
\code
{
uid search
}
corresponds to
\code
{
search
}
. The
\code
{
sort
}
command first searches the mailbox for messages that
match the given searching criteria using the charset argument for
match the given searching criteria using the charset argument for
the interpretation of strings in the searching criteria. It then
the interpretation of strings in the searching criteria. It then
returns the numbers of matching messages.
returns the numbers of matching messages.
...
@@ -384,24 +396,25 @@ msgnums = M.search(None, '(FROM "LDJ")')
...
@@ -384,24 +396,25 @@ msgnums = M.search(None, '(FROM "LDJ")')
Subscribe to new mailbox.
Subscribe to new mailbox.
\end{methoddesc}
\end{methoddesc}
\begin{methoddesc}
{
thread
}{
threading
_
algorithm, charset, search
_
criterion
\optional
{
, ...
}}
\begin{methoddesc}
{
thread
}{
threading
_
algorithm, charset,
The
\code
{
thread
}
command is a variant of
\code
{
search
}
with threading semantics for
search
_
criterion
\optional
{
, ...
}}
the results. Returned data contains a space
The
\code
{
thread
}
command is a variant of
\code
{
search
}
with
threading semantics for the results. Returned data contains a space
separated list of thread members.
separated list of thread members.
Thread members consist of zero or more messages numbers, delimited
by spaces,
Thread members consist of zero or more messages numbers, delimited
indicating successive parent and child.
by spaces,
indicating successive parent and child.
Thread has two arguments before the
\var
{
search
_
criterion
}
Thread has two arguments before the
\var
{
search
_
criterion
}
argument(s); a
\var
{
threading
_
algorithm
}
, and the searching
\var
{
charset
}
.
argument(s); a
\var
{
threading
_
algorithm
}
, and the searching
Note that unlike
\code
{
search
}
, the searching
\var
{
charset
}
argument is mandatory.
\var
{
charset
}
. Note that unlike
\code
{
search
}
, the searching
There is also a
\code
{
uid thread
}
command which corresponds to
\code
{
thread
}
the way
\var
{
charset
}
argument is mandatory. There is also a
\code
{
uid
th
at
\code
{
uid search
}
corresponds to
\code
{
search
}
.
th
read
}
command which corresponds to
\code
{
thread
}
the way that
The
\code
{
thread
}
command first searches the mailbox for messages that
\code
{
uid search
}
corresponds to
\code
{
search
}
. The
\code
{
thread
}
match the given searching criteria using the charset argument for
command first searches the mailbox for messages that match the given
the interpretation of strings in the searching criteria. It thre
n
searching criteria using the charset argument for the interpretatio
n
returns the matching messages threaded according to the specified
of strings in the searching criteria. It thren returns the matching
threading algorithm.
messages threaded according to the specified
threading algorithm.
This is an
\samp
{
IMAP4rev1
}
extension command.
\versionadded
{
2.4
}
This is an
\samp
{
IMAP4rev1
}
extension command.
\versionadded
{
2.4
}
\end{methoddesc}
\end{methoddesc}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment