Skip to main content

Email Sender Utils

PyPI version

An EmailSender type and related utility functions

Project links

Features

  • build_message() — assemble a email.message.EmailMessage from addresses, headers, a body, and optional text/PDF/WAV attachments.
  • mailsend() — send a prepared message over SMTP, with optional STARTTLS and authentication.

Usage

import emailsenderutils

msg = emailsenderutils.build_message(
    fromaddr='me@example.com',
    toaddr_list=['dest@example.com', 'bcc@example.com'],
    fromline='My Name <me@example.com>',
    toline='My Destination <dest@example.com>',
    subjline='The Subject',
    body='The message body',
)

Documentation

API documentation is auto-generated from docstrings.

Development

To set up for local development:

# Clone the repository
git clone git@gitlab.com:sck/emailsenderutils.git EmailSenderUtils
cd EmailSenderUtils

# Create a virtual environment and install all development dependencies
make venv
source venv/bin/activate
make init
make sync-devci

Run quality checks (format, lint, type check, test):

make qa

Release cycle

  1. Edit code and add change notes to the Next Release (TBD) entry in HISTORY.md as you go.

  2. When ready to release, upgrade all dependencies and refresh the environment:

    make update
    make sync-devci
    
  3. Run the full quality check suite:

    make qa
    
  4. In HISTORY.md, replace the Next Release (TBD) heading with the release version and today's date, and verify the change notes are complete.

  5. Sync the version to pyproject.toml and uv.lock:

    make set-version
    
  6. Commit the release:

    git commit -am "Release X.Y.Z"
    
  7. Tag and push. make tag validates version consistency across HISTORY.md, pyproject.toml, and uv.lock; creates an annotated tag; pushes it to origin; and adds a new Next Release (TBD) entry to HISTORY.md:

    make tag
    

    Pushing the tag triggers the GitLab CI/CD publish job, which uploads the package to your selected registry.

  8. Commit to open the next development cycle:

    git commit -am "Start next development cycle"
    
  9. Go back to step 1.

See Release Checklist for the full recurring workflow.

License

MIT.

Acknowledgements

Built with Cookiecutter and the sck/cookiecutter-pypackage-gitlab project template.

Release files for emailsenderutils 0.0.1

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

Source distribution (sdist)

Source distribution for emailsenderutils 0.0.1
File Size Uploaded
emailsenderutils-0.0.1.tar.gz 11.7 kB Details

Built distribution (wheel)

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

Total release size: 20.9 kB

Release files / emailsenderutils-0.0.1.tar.gz

Download URL emailsenderutils-0.0.1.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9b98702e9f0d85eb37b55f075e8edf0800c025dc63642657057c0af50600cac8
BLAKE2b-256 checksum
How to use checksums
df2848359a4d92f4bd34e9f6fc8d844025c19d8ee998b47ac24d7383a736b6fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / emailsenderutils-0.0.1-py3-none-any.whl

Download URL emailsenderutils-0.0.1-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86278637fdd203d5e383e54efe298aa07a59f3dd2602296b7851a74835768171
BLAKE2b-256 checksum
How to use checksums
b4f191742a767056750a26a185b8802d8d587507cfce17bdd11373ab7cab39b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","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.0.1 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