Skip to main content

notify-emailer

Small Python library. Sends HTML error-alert emails through SMTP.

Email includes application name, local timestamp, error message, and error details.

Install

Requires Python 3.9+.

pip install notify-emailer

Or install local checkout:

pip install .

Use

from notify_emailer.config import Config
from notify_emailer.sender import EmailNotifier

config = Config(
    server="smtp.example.com",
    port=25,
    from_addr="alerts@example.com",
    to_addr="ops@example.com",
    application="billing-api",
)

notifier = EmailNotifier(config)
notifier.send_error_email(
    error_message="Database connection failed",
    error_details="Timeout while connecting to db.internal:5432",
)

Set custom subject when needed:

config = Config(
    server="smtp.example.com",
    port=25,
    from_addr="alerts@example.com",
    to_addr="ops@example.com",
    application="billing-api",
    subject="Billing API error",
)

Config

Field Meaning
server SMTP hostname or IP address
port SMTP port
from_addr Sender email address
to_addr Recipient email address
application Name shown in email
subject Email subject; default: App Error Notification

SMTP behavior

Uses plain smtplib.SMTP. No authentication, TLS/STARTTLS, or retry logic built in. Configure server/network accordingly, or extend notifier for authenticated/encrypted SMTP.

License

MIT. See LICENSE.

Metadata

Release files for notify-emailer 0.5.0

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

Source distribution (sdist)

Source distribution for notify-emailer 0.5.0
File Size Uploaded
notify_emailer-0.5.0.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for notify-emailer 0.5.0
File Interpreter ABI Platform
notify_emailer-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / notify_emailer-0.5.0.tar.gz

Download URL notify_emailer-0.5.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a18f650d84c021c11eeac623ab6b84925886625d0f81782b42a26e02eaf025b4
BLAKE2b-256 checksum
How to use checksums
20e2f7f6c5d18f1165357abd449eb470168b068c3d9f79db1b2acf9dacfb3517
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / notify_emailer-0.5.0-py3-none-any.whl

Download URL notify_emailer-0.5.0-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7eec347cf7a0a76ba78c9910b24488851031c719494325ecbfefc9c013b812d0
BLAKE2b-256 checksum
How to use checksums
000a6855e91933c0a3f1c2df2fcfe1cfd99dd3b4e1ae372e319d8e985e593172
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

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