Add your description here
Project description
BMailer
BMailer is an asynchronous email sender built with Python, designed to send bulk emails efficiently using SMTP. It supports templating for email bodies and allows for concurrent sending of multiple emails.
Example Usage
import asyncio
from bmailer import AsyncMailer
from bmailer.models import EmailPayload
from bmailer.templates import render_template
async def main():
sender = AsyncMailer(
host="smtp.gmail.com",
port=587,
username="email@email.com",
password="app_password", # If using Gmail, use an App Password
)
template = "Hello {name},\nYour order #{order_id} has been shipped."
emails = [
EmailPayload(
subject="Order Update",
recipient="target@email.com",
body=render_template(template, name="Recipient", order_id=123),
),
]
await sender.send_bulk(emails, concurrency=5)
if __name__ == "__main__":
asyncio.run(main())
Installation
pip install bmailer
Contribution
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
git clone https://github.com/duytanisme/bmailer.git
cd bmailer
uv sync
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bmailer-0.1.0.tar.gz.
File metadata
- Download URL: bmailer-0.1.0.tar.gz
- Upload date:
- Size: 23.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
633dcea101814b186a74bda067fd0ca20e724ee6c15e273166841fb6111c727a
|
|
| MD5 |
413a760ce6fba972ef1bbcdbc15bf1a3
|
|
| BLAKE2b-256 |
efc26882206065ae70f1f2a72dba5a43c9e10a61ea4e6fc5e43fdab91b9ac546
|
Provenance
The following attestation bundles were made for bmailer-0.1.0.tar.gz:
Publisher:
test-and-release.yaml on duytanisme/bmailer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bmailer-0.1.0.tar.gz -
Subject digest:
633dcea101814b186a74bda067fd0ca20e724ee6c15e273166841fb6111c727a - Sigstore transparency entry: 390430773
- Sigstore integration time:
-
Permalink:
duytanisme/bmailer@7543227fec18d45992f6cccf606c624470274755 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/duytanisme
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test-and-release.yaml@7543227fec18d45992f6cccf606c624470274755 -
Trigger Event:
push
-
Statement type:
File details
Details for the file bmailer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bmailer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
054ec65d79519ea10f99c338aab8fda2bb0787ed0e03e9e2667499f59f7d4895
|
|
| MD5 |
8ad2790ea7ec9ff4bd76b327c4997d4c
|
|
| BLAKE2b-256 |
de88ddeba845f142a601f0c161c33d0e632c4d60ad377377bcc54d7dd939b545
|
Provenance
The following attestation bundles were made for bmailer-0.1.0-py3-none-any.whl:
Publisher:
test-and-release.yaml on duytanisme/bmailer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bmailer-0.1.0-py3-none-any.whl -
Subject digest:
054ec65d79519ea10f99c338aab8fda2bb0787ed0e03e9e2667499f59f7d4895 - Sigstore transparency entry: 390430824
- Sigstore integration time:
-
Permalink:
duytanisme/bmailer@7543227fec18d45992f6cccf606c624470274755 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/duytanisme
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test-and-release.yaml@7543227fec18d45992f6cccf606c624470274755 -
Trigger Event:
push
-
Statement type: