Giter VIP home page Giter VIP logo

aioyagmail's Introduction

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

Join the chat at https://gitter.im/kootenpv/aioyagmail 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="[email protected]", 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"),
                             yag.send(subject="2"),
                             yag.send(subject="3"))

loop.run_until_complete(send_single())
loop.run_until_complete(send_multi())

Username and password

It is possible like in yagmail to use username and password, but this is not actively encouraged anymore. See https://github.com/kootenpv/yagmail#username-and-password 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.

Donate

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

PayPal

aioyagmail's People

Contributors

kootenpv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.