Skip to main content

sremail

License Coverage Version

'SRE Mail' is a Python package designed to make sending email in MIME format a lot easier.

Basic usage

from datetime import datetime

from sremail import message, smtp

msg = message.Message(to=["Sam Gibson <sgibson@glasswallsolutions.com>", "a@b.com"],
                      from_addresses=["another@email.com"],
                      date=datetime.now(),
                      another_header="test")
             .attach("attachment.pdf")

smtp.send(msg, "smtp.some_server.com:25")

Gotchas

  • You can't add the X-FileTrust-Tenant header to a Message with a kwarg, as there's no way to format it in a general way due to the capitalised 'T' in 'Trust'. To get around this you have to add the header manually:
    msg = message.Message(to=["Sam Gibson <sgibson@glasswallsolutions.com>", "a@b.com"],
                      from_addresses=["another@email.com"],
                      date=datetime.now())
    msg.headers["X-FileTrust-Tenant"] = "<guid>"
    

Development

Prerequisites

  • Python 3.6+
  • Pipenv

Quick start

  1. Clone this repo.
  2. Run pipenv sync --dev.
  3. You're good to go. You can run commands using the package inside a pipenv shell, and modify the code with your IDE.

Metadata

Release files for sremail 1.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 sremail 1.0.1
File Size Uploaded Provenance Actions
sremail-1.0.1.tar.gz 6.5 kB Without provenance Details for sremail-1.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 15.2 kB

Release files / sremail-1.0.1.tar.gz

Download URL sremail-1.0.1.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
03cef2a96643eb6d760c161ae88338c3e836680d1ef41fd2113b64dcfab9f526
BLAKE2b-256 checksum
How to use checksums
d51f994348da23ec68d8c96674eaa04faf9aa8060058652cf83e28e7fbc94b01
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7

Release files / sremail-1.0.1-py3-none-any.whl

Download URL sremail-1.0.1-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ccdb3b8d5ea94669ebffaf3c372f52500e6aab8b48377cb424ec2b141a1cca43
BLAKE2b-256 checksum
How to use checksums
338db37c4c36102c53c0bd184ebe7fe0bc371574537f9e11913442766ae533eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7

Security for sremail 1.0.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.0.1 This release

2 release files No 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