• Home
  • Raw
  • Download

Lines Matching refs:IMAP4

1 :mod:`imaplib` --- IMAP4 protocol client
5 :synopsis: IMAP4 protocol client (requires sockets).
15 pair: IMAP4; protocol
23 This module defines three classes, :class:`IMAP4`, :class:`IMAP4_SSL` and
24 :class:`IMAP4_stream`, which encapsulate a connection to an IMAP4 server and
26 :rfc:`2060`. It is backward compatible with IMAP4 (:rfc:`1730`) servers, but
27 note that the ``STATUS`` command is not supported in IMAP4.
29 Three classes are provided by the :mod:`imaplib` module, :class:`IMAP4` is the
33 .. class:: IMAP4([host[, port]])
35 This class implements the actual IMAP4 protocol. The connection is created and
36 protocol version (IMAP4 or IMAP4rev1) is determined when the instance is
38 *port* is omitted, the standard IMAP4 port (143) is used.
40 Three exceptions are defined as attributes of the :class:`IMAP4` class:
43 .. exception:: IMAP4.error
49 .. exception:: IMAP4.abort
51 IMAP4 server errors cause this exception to be raised. This is a sub-class of
52 :exc:`IMAP4.error`. Note that closing the instance and instantiating a new one
56 .. exception:: IMAP4.readonly
59 server. This is a sub-class of :exc:`IMAP4.error`. Some other client now has
68 This is a subclass derived from :class:`IMAP4` that connects over an SSL
71 If *port* is omitted, the standard IMAP4-over-SSL port (993) is used. *keyfile*
80 This is a subclass derived from :class:`IMAP4` that connects to the
91 Parse an IMAP4 ``INTERNALDATE`` string and return corresponding local
103 Converts an IMAP4 ``FLAGS`` response to a tuple of individual flags.
108 Convert *date_time* to an IMAP4 ``INTERNALDATE`` representation. The
116 Note that IMAP4 message numbers change as the mailbox changes; in particular,
133 IMAP4 Objects
140 and the last argument to ``APPEND`` which is passed as an IMAP4 literal. If
141 necessary (the string contains IMAP4 protocol-sensitive characters and isn't
159 An :class:`IMAP4` instance has the following methods:
162 .. method:: IMAP4.append(mailbox, flags, date_time, message)
167 .. method:: IMAP4.authenticate(mechanism, authobject)
183 .. method:: IMAP4.check()
188 .. method:: IMAP4.close()
194 .. method:: IMAP4.copy(message_set, new_mailbox)
199 .. method:: IMAP4.create(mailbox)
204 .. method:: IMAP4.delete(mailbox)
209 .. method:: IMAP4.deleteacl(mailbox, who)
216 .. method:: IMAP4.expunge()
223 .. method:: IMAP4.fetch(message_set, message_parts)
230 .. method:: IMAP4.getacl(mailbox)
236 .. method:: IMAP4.getannotation(mailbox, entry, attribute)
244 .. method:: IMAP4.getquota(root)
247 IMAP4 QUOTA extension defined in rfc2087.
252 .. method:: IMAP4.getquotaroot(mailbox)
255 of the IMAP4 QUOTA extension defined in rfc2087.
260 .. method:: IMAP4.list([directory[, pattern]])
267 .. method:: IMAP4.login(user, password)
272 .. method:: IMAP4.login_cram_md5(user, password)
281 .. method:: IMAP4.logout()
286 .. method:: IMAP4.lsub([directory[, pattern]])
293 .. method:: IMAP4.myrights(mailbox)
300 .. method:: IMAP4.namespace()
307 .. method:: IMAP4.noop()
312 .. method:: IMAP4.open(host, port)
315 the :class:`IMAP4` constructor. The connection objects established by this
316 method will be used in the :meth:`IMAP4.read`, :meth:`IMAP4.readline`,
317 :meth:`IMAP4.send`, and :meth:`IMAP4.shutdown` methods. You may override
321 .. method:: IMAP4.partial(message_num, message_part, start, length)
327 .. method:: IMAP4.proxyauth(user)
335 .. method:: IMAP4.read(size)
340 .. method:: IMAP4.readline()
345 .. method:: IMAP4.recent()
351 .. method:: IMAP4.rename(oldmailbox, newmailbox)
356 .. method:: IMAP4.response(code)
362 .. method:: IMAP4.search(charset, criterion[, ...])
371 # M is a connected IMAP4 instance...
378 .. method:: IMAP4.select([mailbox[, readonly]])
385 .. method:: IMAP4.send(data)
390 .. method:: IMAP4.setacl(mailbox, who, what)
396 .. method:: IMAP4.setannotation(mailbox, entry, attribute[, ...])
404 .. method:: IMAP4.setquota(root, limits)
406 Set the ``quota`` *root*'s resource *limits*. This method is part of the IMAP4
412 .. method:: IMAP4.shutdown()
415 called by :meth:`IMAP4.logout`. You may override this method.
418 .. method:: IMAP4.socket()
423 .. method:: IMAP4.sort(sort_criteria, charset, search_criterion[, ...])
441 .. method:: IMAP4.status(mailbox, names)
446 .. method:: IMAP4.store(message_set, command, flag_list)
460 .. method:: IMAP4.subscribe(mailbox)
465 .. method:: IMAP4.thread(threading_algorithm, charset, search_criterion[, ...])
488 .. method:: IMAP4.uid(command, arg[, ...])
496 .. method:: IMAP4.unsubscribe(mailbox)
501 .. method:: IMAP4.xatom(name[, arg[, ...]])
512 The following attributes are defined on instances of :class:`IMAP4`:
515 .. attribute:: IMAP4.PROTOCOL_VERSION
521 .. attribute:: IMAP4.debug
529 IMAP4 Example
537 M = imaplib.IMAP4()