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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

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