Skip to main content

Platzky plugin for sending emails with optional file attachments

Project description

platzky-sendmail

Platzky plugin for sending emails with optional file attachments.

Installation

pip install platzky-sendmail

Activation

Add the plugin to the plugins list in your Platzky database configuration. The name must match the entry-point key declared in pyproject.toml:

{
    "plugins": [
        {
            "name": "sendmail",
            "config": {
                "sender_email": "sender@example.com",
                "password": "MY-SECRET-PASSWORD",
                "smtp_server": "smtp.example.com",
                "port": 465,
                "receiver_email": "receiver@example.com",
                "subject": "Default email subject"
            }
        }
    ]
}

Port 465 uses implicit SSL (SMTP_SSL); any other port uses explicit TLS via STARTTLS.

Development

This plugin extends NotifierPluginBase. It declares the notification topics it accepts via accepted_topics and implements notify(self, notification) to deliver the message — and any attachments — over SMTP. Total attachment size is capped at 25 MB (DEFAULT_MAX_TOTAL_ATTACHMENT_SIZE), raising AttachmentSizeError if exceeded.

poetry install        # Install dependencies
make lint             # Auto-format and fix (black + ruff --fix)
make lint-check       # Check formatting/linting + types + docstrings (CI)
make dev              # Lint + type check (pyright)
make unit-tests       # Run all tests
make coverage         # Tests with coverage
make build            # Build wheel/sdist

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

platzky_sendmail-0.3.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

platzky_sendmail-0.3.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file platzky_sendmail-0.3.0.tar.gz.

File metadata

  • Download URL: platzky_sendmail-0.3.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for platzky_sendmail-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a96bb35e3e22772353aa7bf85e7bb9ba237876f9cc1fcec30e2beb02ffa195c5
MD5 62039bebe03d181379a5adab55ee9fe8
BLAKE2b-256 3f966b99dc23cd0dbdd9f7019afc39d01a95660071bb252ef9248f5ba593c964

See more details on using hashes here.

Provenance

The following attestation bundles were made for platzky_sendmail-0.3.0.tar.gz:

Publisher: release.yml on platzky/platzky-sendmail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file platzky_sendmail-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for platzky_sendmail-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f38345cdc9a3949b0c34de00845a1099152e1b9e3a69f19a8427000b52713859
MD5 b59b6ddd2a976336ec6f9b9a462b8908
BLAKE2b-256 3dd57706324c6b781bbfbc4d8989afda112edaba0166216ddf8f24bcc6cc5c78

See more details on using hashes here.

Provenance

The following attestation bundles were made for platzky_sendmail-0.3.0-py3-none-any.whl:

Publisher: release.yml on platzky/platzky-sendmail

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page