Skip to main content

Yet Another GMAIL client, using AsyncIO

Project description

aioyagmail -- Yet Another GMAIL/SMTP client, using AsyncIO

Join the chat at PyPI PyPI

The goal here is to make it as simple and painless as possible to send emails using asyncio.

In the end, your code will look something like this:

import asyncio
from aioyagmail import AIOSMTP

loop = asyncio.get_event_loop()

async def send_single():
    # walks you through oauth2 process if no file at this location
    async with AIOSMTP(oauth2_file="~/oauth2_gmail.json") as yag:
        await yag.send(to="", subject="hi")

async def send_multi():
    async with AIOSMTP(oauth2_file="~/oauth2_gmail.json") as yag:
        # Runs asynchronously!
        await asyncio.gather(yag.send(subject="1"),


Username and password

It is possible like in yagmail to use username and password, but this is not actively encouraged anymore. See how to do it.

For more information

Have a look at yagmail. Any issue NOT related to async should be posted there (or found out about).

Word of caution

Watch out that gmail does not block you for spamming. Using async you could potentially be sending emails too rapidly.


If you like aioyagmail, feel free (no pun intended) to donate any amount you'd like :-)


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aioyagmail-0.0.4.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

aioyagmail-0.0.4-py2.py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page