Skip to main content

Rick-mailer - Library to send emails

Tests pypi license

rick_mailer is a standalone version of Django's email library implementation, with minor changes.

Installation

$ pip3 install rick-mailer

Usage

from rick_mailer import SMTPFactory, Mailer

cfg = {
    'smtp_host': '127.0.0.1',
    'smtp_port': 25,
    'smtp_username': 'relay@local',
    'smtp_password': 'securePassword',
    'smtp_use_tls': False,
    'smtp_use_ssl': False,
}
conn = SMTPFactory(cfg)

mailer = Mailer(conn)
mailer.send_mail('some subject', 'message contents', 'noreply@localhost', ['user1@domain.tld', 'user2@domain.tld'])

Configuration options

SMTPFactory(cfg) reads the following keys from cfg:

Key Default Description
smtp_host 'localhost' SMTP server hostname.
smtp_port 25 SMTP server port.
smtp_username '' Username for authentication (empty disables login).
smtp_password '' Password for authentication.
smtp_use_tls False Use STARTTLS on a plain connection.
smtp_use_ssl False Use an implicit TLS (SSL) connection. Mutually exclusive with smtp_use_tls.
smtp_timeout None Socket timeout in seconds.
smtp_ssl_keyfile None Path to a client-side private key (PEM).
smtp_ssl_certfile None Path to a client-side certificate (PEM); required when smtp_ssl_keyfile is set.

Security note: smtp_use_tls and smtp_use_ssl default to False. When sending credentials (smtp_username/smtp_password), enable one of them (smtp_use_tls=True for STARTTLS, or smtp_use_ssl=True for an implicit TLS connection) so the password is not transmitted in cleartext.

Related tools

Check out Mailpit, a mail testing tool for developers.

License

As rick_mailer is mostly Django code, it is licensed under Django license and copyright - see the included License file.

Metadata

Release files for rick-mailer 1.1.2

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

Source distribution (sdist)

Source distribution for rick-mailer 1.1.2
File Size Uploaded Provenance
rick_mailer-1.1.2.tar.gz 23.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for rick-mailer 1.1.2
File Interpreter ABI Platform
rick_mailer-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 50.5 kB

Release files / rick_mailer-1.1.2.tar.gz

Download URL rick_mailer-1.1.2.tar.gz
Size 23.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1ad40abf2531f3daada4fdab4aeff99738263f9bfad5c25235451e4242618183
BLAKE2b-256 checksum
How to use checksums
b8466ebcd0014423e519abca5c2f26d6ab797414c2a0d9ab4638c5cbfab7b1ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 2, 2026.

Transparency log

Release files / rick_mailer-1.1.2-py3-none-any.whl

Download URL rick_mailer-1.1.2-py3-none-any.whl
Size 26.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3dbd85f662ddbb8aec243cdfb5afe694bf66d264d8def1c73239c113fe829758
BLAKE2b-256 checksum
How to use checksums
3a482d7161bcb8c23946eac0b9d47a334625c58d725c53b08f5672f325cf887e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 2, 2026.

Transparency log

Security for rick-mailer 1.1.2

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rick_mailer-1.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 2, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files Full provenance

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