Email Sender Utils
An EmailSender type and related utility functions
- Created by Scott Karlin
- GitLab: https://gitlab.com/sck
- PyPI: https://pypi.org/user/sckarlin/
Project links
- PyPI: https://pypi.org/project/emailsenderutils/
- Documentation: https://sck.gitlab.io/emailsenderutils/
- Source & issues: https://gitlab.com/sck/emailsenderutils
Features
build_message()— assemble aemail.message.EmailMessagefrom 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
- Live site: https://sck.gitlab.io/emailsenderutils/
- Preview locally:
make docs-serve(serves at http://localhost:8000)
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
-
Edit code and add change notes to the
Next Release (TBD)entry inHISTORY.mdas you go. -
When ready to release, upgrade all dependencies and refresh the environment:
make update make sync-devci
-
Run the full quality check suite:
make qa -
In
HISTORY.md, replace theNext Release (TBD)heading with the release version and today's date, and verify the change notes are complete. -
Sync the version to
pyproject.tomlanduv.lock:make set-version -
Commit the release:
git commit -am "Release X.Y.Z"
-
Tag and push.
make tagvalidates version consistency acrossHISTORY.md,pyproject.toml, anduv.lock; creates an annotated tag; pushes it toorigin; and adds a newNext Release (TBD)entry toHISTORY.md:make tagPushing the tag triggers the GitLab CI/CD publish job, which uploads the package to your selected registry.
-
Commit to open the next development cycle:
git commit -am "Start next development cycle"
-
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)
| File | Size | Uploaded | |
|---|---|---|---|
| emailsenderutils-0.0.1.tar.gz | 11.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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}
|