Skip to content

Manage email account using python, forget about imap and just code what you supposed to do.

License

Notifications You must be signed in to change notification settings

dylandoamaral/ggmail

Repository files navigation

GGmail

GGmail Continuous Integration codecov PyPI version downloads versions License: MIT

Manage mail 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, Google
from ggmail.policy import from_contains, flagged

authentication = Google(username="[email protected]", password="secret")
with Account(authentication=authentication) as 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.

You don't support my mail provider ?

You can raise an issue and I will add it.