Skip to content

Instantly share code, notes, and snippets.

@serrasqueiro
Created June 13, 2021 12:18
Show Gist options
  • Select an option

  • Save serrasqueiro/5f5d9595b0b4020bdf1f337734f4c5a6 to your computer and use it in GitHub Desktop.

Select an option

Save serrasqueiro/5f5d9595b0b4020bdf1f337734f4c5a6 to your computer and use it in GitHub Desktop.
# simple_pop_list.txt
#
# https://docs.python.org/3/library/poplib.html
import poplib
email, password = "*@*", "*"
pop3_server = "pop.zoho.com"
server = poplib.POP3_SSL(pop3_server, 995, timeout=10)
server.set_debuglevel(1)
ok_there = server.getwelcome()
astr = server.user(email)
astr = server.pass_(password)
capas = tuple(sorted(server.capa()))
xyz = server.stat() # (message count, mailbox size)
tup = server.list() # (response, ['mesg_num octets', ...], octets)
new = server.noop().decode('ascii')
astr = server.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment