Skip to main content

Add your description here

Project description

BMailer

image image image Actions status codecov

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


Download files

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

Source Distribution

bmailer-0.1.0.tar.gz (23.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bmailer-0.1.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

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

Hashes for bmailer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 633dcea101814b186a74bda067fd0ca20e724ee6c15e273166841fb6111c727a
MD5 413a760ce6fba972ef1bbcdbc15bf1a3
BLAKE2b-256 efc26882206065ae70f1f2a72dba5a43c9e10a61ea4e6fc5e43fdab91b9ac546

See more details on using hashes here.

Provenance

The following attestation bundles were made for bmailer-0.1.0.tar.gz:

Publisher: test-and-release.yaml on duytanisme/bmailer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for bmailer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 054ec65d79519ea10f99c338aab8fda2bb0787ed0e03e9e2667499f59f7d4895
MD5 8ad2790ea7ec9ff4bd76b327c4997d4c
BLAKE2b-256 de88ddeba845f142a601f0c161c33d0e632c4d60ad377377bcc54d7dd939b545

See more details on using hashes here.

Provenance

The following attestation bundles were made for bmailer-0.1.0-py3-none-any.whl:

Publisher: test-and-release.yaml on duytanisme/bmailer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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