imaplib.IMAP4_SSL

class imaplib.IMAP4_SSL(host='', port=993, keyfile=None, certfile=None)[source]

IMAP4 client class over SSL connection

Instantiate with: IMAP4_SSL([host[, port[, keyfile[, certfile]]]])

host - host’s name (default: localhost); port - port number (default: standard IMAP4 SSL port). keyfile - PEM formatted file that contains your private key (default: None); certfile - PEM formatted certificate chain file (default: None);

for more documentation see the docstring of the parent class IMAP4.

Methods

_CRAM_MD5_AUTH(challenge) Authobject to use with CRAM-MD5 authentication.
__getattr__(attr)
__init__([host, port, keyfile, certfile])
_append_untagged(typ, dat)
_check_bye()
_checkquote(arg)
_command(name, *args)
_command_complete(name, tag)
_dump_ur(dict)
_get_line()
_get_response()
_get_tagged_response(tag)
_log(line)
_match(cre, s)
_mesg(s[, secs])
_new_tag()
_quote(arg)
_simple_command(name, *args)
_untagged_response(typ, dat, name)
append(mailbox, flags, date_time, message) Append message to named mailbox.
authenticate(mechanism, authobject) Authenticate command - requires response processing.
capability() (typ, [data]) = <instance>.capability()
check() Checkpoint mailbox on server.
close() Close currently selected mailbox.
copy(message_set, new_mailbox) Copy ‘message_set’ messages onto end of ‘new_mailbox’.
create(mailbox) Create new mailbox.
delete(mailbox) Delete old mailbox.
deleteacl(mailbox, who) Delete the ACLs (remove any rights) set for who on mailbox.
expunge() Permanently remove deleted items from selected mailbox.
fetch(message_set, message_parts) Fetch (parts of) messages.
getacl(mailbox) Get the ACLs for a mailbox.
getannotation(mailbox, entry, attribute) (typ, [data]) = <instance>.getannotation(mailbox, entry, attribute)
getquota(root) Get the quota root’s resource usage and limits.
getquotaroot(mailbox) Get the list of quota roots for the named mailbox.
list([directory, pattern]) List mailbox names in directory matching pattern.
login(user, password) Identify client using plaintext password.
login_cram_md5(user, password) Force use of CRAM-MD5 authentication.
logout() Shutdown connection to server.
lsub([directory, pattern]) List ‘subscribed’ mailbox names in directory matching pattern.
myrights(mailbox) Show my ACLs for a mailbox (i.e.
namespace() Returns IMAP namespaces ala rfc2342
noop() Send NOOP command.
open([host, port]) Setup connection to remote server on “host:port”.
partial(message_num, message_part, start, length) Fetch truncated part of a message.
print_log()
proxyauth(user) Assume authentication as “user”.
read(size) Read ‘size’ bytes from remote.
readline() Read line from remote.
recent() Return most recent ‘RECENT’ responses if any exist, else prompt server for an update using the ‘NOOP’ command.
rename(oldmailbox, newmailbox) Rename old mailbox name to new.
response(code) Return data for response ‘code’ if received, or None.
search(charset, *criteria) Search mailbox for matching messages.
select([mailbox, readonly]) Select a mailbox.
send(data) Send data to remote.
setacl(mailbox, who, what) Set a mailbox acl.
setannotation(*args) (typ, [data]) = <instance>.setannotation(mailbox[, entry, attribute]+)
setquota(root, limits) Set the quota root’s resource limits.
shutdown() Close I/O established in “open”.
socket() Return socket instance used to connect to IMAP4 server.
sort(sort_criteria, charset, *search_criteria) IMAP4rev1 extension SORT command.
ssl() Return SSLObject instance used to communicate with the IMAP4 server.
status(mailbox, names) Request named status conditions for mailbox.
store(message_set, command, flags) Alters flag dispositions for messages in mailbox.
subscribe(mailbox) Subscribe to new mailbox.
thread(threading_algorithm, charset, ...) IMAPrev1 extension THREAD command.
uid(command, *args) Execute “command arg ...” with messages identified by UID, rather than message number.
unsubscribe(mailbox) Unsubscribe from old mailbox.
xatom(name, *args) Allow simple extension commands notified by server in CAPABILITY response.

Attributes

mustquote