Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Jemail

Django app to store emails in db

Installation

pip install jemail
pip install django-anymail[sendgrid]

Anymail used as email backend, for now jemail tested only with sendgrid backend.

Update settings with:

EMAIL_BACKEND = "anymail.backends.sendgrid.EmailBackend"

# defaults
JEMAIL = {
    "METADATA_ID_KEY": "message_id",  # tag name for EmailMessage.pk in message metadata
    "HTML_MESSAGE_UPLOAD_TO": "emails/messages/",  # path to save html messages to
    "ATTACHMENT_UPLOAD_TO": "emails/attachments/",  # path to save attachments to
    # "IMPORT_HTML_MESSAGE_UPLOAD_TO": "myproject.utils.message_upload_to",  # callable option
    # "IMPORT_ATTACHMENT_UPLOAD_TO": "myproject.utils.attachment_upload_to",  # callable option
}

Usage

from jemail import EmailMessage, EmailAttachment

# save email in db
EmailMessage.objects.create_with_objects(
    to=["user@example.com"],
    subject="Subject",
    # if body not provided it derived from html_message
    # using html2text library
    body="Hi User,...",
    html_message="<p>Hi User...",
    # the rest is optional
    from_email="no-reply@example.com",
    cc=["cc@example.com"],
    bcc=["bcc@example.com"],
    attachments=[
        EmailAttachment.objects.create(
            filename="doc.pdf",
            mimetype="application/pdf",
            file=ContentFile(b"...", name="doc.pdf"),
        )
    ],
    reply_to=["Example Team <support@example.com>"],
    created_by_id=user.pk,
)

# build EmailMultiAlternatives from db
msg = EmailMessage.objects.get(pk=pk).build_message()
# send email
msg.send()

Development

nix-direnv:

echo "use flake" >> .envrc
direnv allow
app.install
pytest

nix:

nix develop
app.install
pytest

uv:

uv -q venv .venv
source .venv/bin/activate
uv pip install -e .[dev,test]
pre-commit install
pytest

Metadata

Release files for jemail 0.1b2

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

Source distribution (sdist)

Source distribution for jemail 0.1b2
File Size Uploaded Provenance
jemail-0.1b2.tar.gz 8.9 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for jemail 0.1b2
File Interpreter ABI Platform
jemail-0.1b2-py3-none-any.whl Python 3 none any Details

Total release size: 19.1 kB

Release files / jemail-0.1b2.tar.gz

Download URL jemail-0.1b2.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e5acb08cec6b6216fc8422deb137e7a1dd8710043730a251735e191b12202193
BLAKE2b-256 checksum
How to use checksums
279955b4bb91b99e8db53f5cce8090ab71b84960ff1719dd5840a8bf48c3eb5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 11, 2026.

Transparency log

Release files / jemail-0.1b2-py3-none-any.whl

Download URL jemail-0.1b2-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b48e948b89f0c8b111be04b2d5a05aad77278d2aa8d1b81491e78b070ed1462a
BLAKE2b-256 checksum
How to use checksums
fd2ad22fc708d22205b7d3252e1d71efda085fad937e68f74a1386caa768f841
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 11, 2026.

Transparency log

Security for jemail 0.1b2

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 jemail-0.1b2.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 Oct 11, 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.

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