GGmail
Manage gmail account using python, forget about imap and just code what you supposed to do.
Help
See documentation for more details.
Install
Install using pip install ggmail
.
A Simple Example
from ggmail import Account
from ggmail.policy import from_contains, flagged
account = Account(username="[email protected]", password="secret")
with account:
inbox = account.inbox()
mailbox = account.create_mailbox("Favorite")
policy = from_contains("[email protected]") + flagged
messages = inbox.search(policy)
for message in messages:
message.copy(mailbox)
Additional Information
Why not use imbox instead ?
https://github.com/martinrusev/imbox is less high level than ggmail. I wanted something even more human than imbox.
Why not use gmail instead ?
https://github.com/charlierguo/gmail seems to be dead.