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
a3a16689
Kaydet (Commit)
a3a16689
authored
Tem 20, 2001
tarafından
Piers Lauder
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
apply patch item #416254
üst
15e5d534
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
3 deletions
+48
-3
libimaplib.tex
Doc/lib/libimaplib.tex
+48
-3
No files found.
Doc/lib/libimaplib.tex
Dosyayı görüntüle @
a3a16689
...
...
@@ -156,6 +156,11 @@ An \class{IMAP4} instance has the following methods:
of message part envelope and data.
\end{methoddesc}
\begin{methoddesc}
{
getacl
}{
mailbox
}
Get the
\samp
{
ACL
}
s for
\var
{
mailbox
}
.
The method is non-standard, but is supported by the
\samp
{
Cyrus
}
server.
\end{methoddesc}
\begin{methoddesc}
{
list
}{
\optional
{
directory
\optional
{
, pattern
}}}
List mailbox names in
\var
{
directory
}
matching
\var
{
pattern
}
.
\var
{
directory
}
defaults to the top-level mail
...
...
@@ -185,6 +190,8 @@ An \class{IMAP4} instance has the following methods:
\begin{methoddesc}
{
open
}{
host, port
}
Opens socket to
\var
{
port
}
at
\var
{
host
}
.
The connection objects established by this method
will be used in the
\code
{
read
}
,
\code
{
readline
}
, and
\code
{
shutdown
}
methods.
You may override this method.
\end{methoddesc}
...
...
@@ -193,6 +200,16 @@ An \class{IMAP4} instance has the following methods:
Returned data is a tuple of message part envelope and data.
\end{methoddesc}
\begin{methoddesc}
{
read
}{
size
}
Reads
\var
{
size
}
bytes from the remote server.
You may override this method.
\end{methoddesc}
\begin{methoddesc}
{
readline
}{}
Reads one line from the remote server.
You may override this method.
\end{methoddesc}
\begin{methoddesc}
{
recent
}{}
Prompt server for an update. Returned data is
\code
{
None
}
if no new
messages, else value of
\samp
{
RECENT
}
response.
...
...
@@ -233,8 +250,36 @@ msgnums = M.search(None, '(FROM "LDJ")')
to the mailbox are not allowed.
\end{methoddesc}
\begin{methoddesc}
{
setacl
}{
mailbox, who, what
}
Set an
\samp
{
ACL
}
for
\var
{
mailbox
}
.
The method is non-standard, but is supported by the
\samp
{
Cyrus
}
server.
\end{methoddesc}
\begin{methoddesc}
{
shutdown
}{}
Close connection established in
\code
{
open
}
.
You may override this method.
\end{methoddesc}
\begin{methoddesc}
{
socket
}{}
Returns socket instance used to connect to server.
Returns socket instance used to connect to server.
\end{methoddesc}
\begin{methoddesc}
{
sort
}{
sort
_
criteria, charset, search
_
criterium
\optional
{
, ...
}}
The
\code
{
sort
}
command is a variant of
\code
{
search
}
with sorting semantics for
the results. Returned data contains a space
separated list of matching message numbers.
Sort has two arguments before the
\var
{
search
_
criterium
}
argument(s); a parenthesized list of
\var
{
sort
_
criteria
}
, and the searching
\var
{
charset
}
.
Note that unlike
\code
{
search
}
, the searching
\var
{
charset
}
argument is mandatory.
There is also a
\code
{
uid sort
}
command which corresponds to
\code
{
sort
}
the way
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
the interpretation of strings in the searching criteria. It then
returns the numbers of matching messages.
This is an
\samp
{
IMAP4rev1
}
extension command.
\end{methoddesc}
\begin{methoddesc}
{
status
}{
mailbox, names
}
...
...
@@ -287,13 +332,13 @@ Here is a minimal example (without error checking) that opens a
mailbox and retrieves and prints all messages:
\begin{verbatim}
import getpass, imaplib
, string
import getpass, imaplib
M = imaplib.IMAP4()
M.login(getpass.getuser(), getpass.getpass())
M.select()
typ, data = M.search(None, 'ALL')
for num in
string.split(data[0]
):
for num in
data[0].split(
):
typ, data = M.fetch(num, '(RFC822)')
print 'Message
%s\n%s\n' % (num, data[0][1])
M.logout()
...
...
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