Skip to main content

ppmail

Tool to send messages via Sendgrid/Slack

PyPI package: ppmail

If you spot any problems or have any improvement ideas then feel free to open an issue and I will be glad to look into it for you.

Installation

A recommended way of installing the tool is pip install.

Once installed, a command line tool ppmail should be available in your system’s PATH.

pip install

The tool is available in PyPI and can be installed using pip:

$ pip install --user ppmail
$ ppmail --help

Configuration

By default, the tool reads its configuration from ~/.config/ppmail file (the location can be overridden by setting environment variable XDG_CONFIG_HOME). If the config file (or directory) does not exist then it will be automatically created and populated with sample config upon the next run.

Usage - Help

$ ppmail --help
usage: ppmail [--version] [--help] [--debug] [--verbose] [-S] [-f SENDER] -t
              RECIPIENTS [RECIPIENTS ...] [-c CC [CC ...]] [-s SUBJECT] [-H]
              [-F FONT_SIZE]

Tool to send messages via Sendgrid/Slack

optional arguments:
  --version             show program's version number and exit
  --help                show this help message and exit
  --debug               debugging mode
  --verbose             verbose logging mode
  -S, --slack           Use Slack instead of Sendgrid
  -f SENDER, --from SENDER
                        sender
  -t RECIPIENTS [RECIPIENTS ...], --to RECIPIENTS [RECIPIENTS ...]
                        recipient
  -c CC [CC ...], --cc CC [CC ...]
                        carbon copy recipient
  -s SUBJECT, --subject SUBJECT
                        subject
  -H, --code            send HTML formatted email/code block
  -F FONT_SIZE, --font-size FONT_SIZE
                        font size in px for HTML formatted email (use with -H)

Usage - CLI

$ echo 'The king is dead, long live the king!' \
  | ppmail -SHf 'Jon Snow' \
  -t 'arya.stark@winterfell.com' \
  -c 'sansa.stark@winterfell.com' \
  -s 'Re: secret message'

Usage - Python module

from ppmail import Mailer

mailer = Mailer(slack=True)

status = mailer.send(
    sender='Jon Snow',
    recipients=['arya.stark@winterfell.com'],
    cc=['sansa.stark@winterfell.com'],
    subject='Re: secret message',
    message='The king is dead, long live the king!',
    code=True
)

Metadata

Release files for ppmail 2.2.2

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

Source distribution (sdist)

Source distribution for ppmail 2.2.2
File Size Uploaded Provenance Actions
ppmail-2.2.2.tar.gz 5.8 kB Without provenance Details for ppmail-2.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ppmail 2.2.2
File Interpreter ABI Platform Actions
ppmail-2.2.2-py2.py3-none-any.whl Python 2, Python 3 none any Details for ppmail-2.2.2-py2.py3-none-any.whl

Total release size: 24.3 kB

Release files / ppmail-2.2.2.tar.gz

Download URL ppmail-2.2.2.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9e344294e447a38e61c2ca1e1e5368b6a3b3d30e4880cf86032a04a3a70a1479
BLAKE2b-256 checksum
How to use checksums
8a975358a02264f35a916af8d0249dbe7c38e9a8c502c5327996ac90e12dac5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

Release files / ppmail-2.2.2-py2.py3-none-any.whl

Download URL ppmail-2.2.2-py2.py3-none-any.whl
Size 18.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
27d07b03cf6296c428da45a9884d38e12036ae19ee7288ba6eabd21fa668a48d
BLAKE2b-256 checksum
How to use checksums
e25a48dd2bed48cce1b562786a3362fd15a3886e0062cdf6fe055c68bf476ae9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

Security for ppmail 2.2.2

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.

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