Skip to main content

<p align="center">
<img src="./resources/icon.png" width="48px"/>
</p>

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

[![Join the chat at https://gitter.im/kootenpv/aioyagmail](https://badges.gitter.im/kootenpv/aioyagmail.svg)](https://gitter.im/kootenpv/aioyagmail?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![PyPI](https://img.shields.io/pypi/v/aioyagmail.svg?style=flat-square)](https://pypi.python.org/pypi/aioyagmail/)
[![PyPI](https://img.shields.io/pypi/pyversions/aioyagmail.svg?style=flat-square)](https://pypi.python.org/pypi/aioyagmail/)

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:

```python
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="someone@gmail.com", 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](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Y7QCCEPGC6R5E)


Release files for aioyagmail 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aioyagmail 0.0.3
File Size Uploaded Provenance Actions
aioyagmail-0.0.3.tar.gz 4.8 kB Without provenance Details for aioyagmail-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aioyagmail 0.0.3
File Interpreter ABI Platform Actions
aioyagmail-0.0.3-py2.py3-none-any.whl Python 3, Python 2 none any Details for aioyagmail-0.0.3-py2.py3-none-any.whl

Total release size: 11.1 kB

Release files / aioyagmail-0.0.3.tar.gz

Download URL aioyagmail-0.0.3.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fd9aff395311b28a026be64258a843f9ff9b5f3c01eeceedbd3e1b88e7cdf4a2
BLAKE2b-256 checksum
How to use checksums
2a9ebdd8556cfe0aa610d4e91e067660f12bf880bf3f1a9e1cc0073adf1133dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / aioyagmail-0.0.3-py2.py3-none-any.whl

Download URL aioyagmail-0.0.3-py2.py3-none-any.whl
Size 6.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
1cf1be464f895fc5366e44a9852c1ab5e04f441678f12020333f81bccadb197a
BLAKE2b-256 checksum
How to use checksums
eb3e4a926e4e572373c9579480c47e3b98baca26d13573f17d669d718bcf7d61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for aioyagmail 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page