Skip to main content

Mail-CLI, send mail with mailgun service.

Project description

Mail CLI

Encapsulation for email senders, include mailgun service and SMTP mailer.

Install

To install mail helper, run this command in your terminal:

$ pip install -U git+https://github.com/debugtalk/mail-cli.git#egg=mail-cli

Usage

$ python mailcli.py -h
usage: mailcli.py [-h] [-V] [-u MAILGUN_SMTP_USERNAME]
                  [-p MAILGUN_SMTP_PASSWORD] [--mail-sender MAIL_SENDER]
                  [--mail-recepients [MAIL_RECEPIENTS [MAIL_RECEPIENTS ...]]]
                  [--mail-subject MAIL_SUBJECT] [--mail-content MAIL_CONTENT]
                  [--mail-content-path MAIL_CONTENT_PATH]

Mail-CLI, send mail with mailgun service.

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show version
  -u MAILGUN_SMTP_USERNAME, --mailgun-smtp-username MAILGUN_SMTP_USERNAME
                        Specify mailgun smtp username.
  -p MAILGUN_SMTP_PASSWORD, --mailgun-smtp-password MAILGUN_SMTP_PASSWORD
                        Specify mailgun smtp password.
  --mail-sender MAIL_SENDER
                        Specify email sender.
  --mail-recepients [MAIL_RECEPIENTS [MAIL_RECEPIENTS ...]]
                        Specify email recepients.
  --mail-subject MAIL_SUBJECT
                        Specify email subject.
  --mail-content MAIL_CONTENT
                        Specify email content.
  --mail-content-path MAIL_CONTENT_PATH
                        Load file content as mail content.

Examples

send mail with content

$ python mailcli.py \
    -u "user@mail.com" \
    -p "pwd123" \
    --mail-sender "sender@mail.com" \
    --mail-recepients test1@mail.com test2@mail.com \
    --mail-subject subject-test \
    --mail-content hello-world

send mail with file content

$ python mailcli.py \
    -u "user@mail.com" \
    -p "pwd123" \
    --mail-sender "sender@mail.com" \
    --mail-recepients test1@mail.com test2@mail.com \
    --mail-subject subject-test \
    --mail-content-path 1534006836.html

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

mailcli-0.3.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

mailcli-0.3.1-py2.py3-none-any.whl (3.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file mailcli-0.3.1.tar.gz.

File metadata

  • Download URL: mailcli-0.3.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5+

File hashes

Hashes for mailcli-0.3.1.tar.gz
Algorithm Hash digest
SHA256 59364f24d1f690935a0f577dc1d2029b60825dab40b5cd30aea2c92a4bd1c893
MD5 568b6542e99ce025af793f2bce08d861
BLAKE2b-256 7292af2a819cdf28c8f8949437c799fcd6a86bb67da78949a7add3b9df3a9c2d

See more details on using hashes here.

File details

Details for the file mailcli-0.3.1-py2.py3-none-any.whl.

File metadata

  • Download URL: mailcli-0.3.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5+

File hashes

Hashes for mailcli-0.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f410080632191af3965987c486d815eb1e826c1624d5072618a82d8eb7f8a631
MD5 ca3ce3ece35ceb3a9bca34fe36442cf4
BLAKE2b-256 7192761a180383f1fda9b9f0155632e71c9b417650ace425cde5585ca506cbf5

See more details on using hashes here.

Supported by

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