Tool to send messages via Sendgrid/Slack
Project description
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
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ppmail-2.2.2.tar.gz.
File metadata
- Download URL: ppmail-2.2.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e344294e447a38e61c2ca1e1e5368b6a3b3d30e4880cf86032a04a3a70a1479
|
|
| MD5 |
5ec1f86f46fcc5af238bd640366390c3
|
|
| BLAKE2b-256 |
8a975358a02264f35a916af8d0249dbe7c38e9a8c502c5327996ac90e12dac5c
|
File details
Details for the file ppmail-2.2.2-py2.py3-none-any.whl.
File metadata
- Download URL: ppmail-2.2.2-py2.py3-none-any.whl
- Upload date:
- Size: 18.5 kB
- Tags: Python 2, Python 3
- Uploaded using 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
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27d07b03cf6296c428da45a9884d38e12036ae19ee7288ba6eabd21fa668a48d
|
|
| MD5 |
2fad65600a494b2b5c23f4a0f71068bf
|
|
| BLAKE2b-256 |
e25a48dd2bed48cce1b562786a3362fd15a3886e0062cdf6fe055c68bf476ae9
|