Skip to main content

an auto mailer to send emails in batch for you

Project description

ntuee-mailer

This is a simple mailer for NTU students to send letters in batches.

Installation

$ pip install ntuee-mailer

Usage:

$ ntuee-mailer [OPTIONS] COMMAND [ARGS]...

Options:

  • --install-completion: Install completion for the current shell.
  • --show-completion: Show completion for the current shell, to copy it or customize the installation.
  • --help: Show this message and exit.

Commands:

  • check: check wether a directory is a valid letter a...
  • config: configure the auto mailer a valid config file...
  • new: create a new letter from template
  • send: send emails to a list of recipients as...

ntuee-mailer check

check wether a directory is a valid letter

a letter folder should be structured as follows:

letter_name
├── attachments
│ ├── ...
│ └── ...
├── config.yml
├── content.html
└── recipients.csv

Usage:

$ ntuee-mailer check [OPTIONS] LETTER_PATH

Arguments:

  • LETTER_PATH: Path to letter directory [required]

Options:

  • --help: Show this message and exit.

ntuee-mailer config

configure the auto mailer

a valid config file should have the following structure:

[smtp]
host=smtps.ntu.edu.tw
port=465
timeout=5
[pop3]
host=msa.ntu.edu.tw
port=995
timeout=5
[account]
name=John Doe

Usage:

$ ntuee-mailer config [OPTIONS]

Options:

  • -f, --file TEXT: Path to new config file whose content will be copied to config.ini
  • -r, --reset: Reset config.ini to default [default: False]
  • -l, --list: list current config [default: False]
  • --help: Show this message and exit.

ntuee-mailer new

create a new letter from template

Usage:

$ ntuee-mailer new [OPTIONS] LETTER_NAME

Arguments:

  • LETTER_NAME: Name of letter [required]

Options:

  • --help: Show this message and exit.

ntuee-mailer send

send emails to a list of recipients as configured in your letter

Usage:

$ ntuee-mailer send [OPTIONS] [LETTER_PATH]

Arguments:

  • [LETTER_PATH]: Path to letter

Options:

  • -t, --test: Test mode: send mail to yourself [default: False]
  • -c, --config FILE: Path to config.ini [default: /home/madmax/.config/ntuee-mailer/config.ini]
  • -q, --quiet: Quiet mode: less output [default: False]
  • -d, --debug INTEGER RANGE: Debug level [default: 0]
  • --help: Show this message and exit.

ntuee-mailer test

Usage:

$ ntuee-mailer test [OPTIONS]

Options:

  • --help: Show this message and exit.

mail format

a letter folder should be structured as follows:

letter_name
├── attachments
│ ├── ...
│ └── ...
├── config.yml
├── content.html
└── recipients.csv

content.html

The content of the email. $<pattern> would be replaced by the corresponding field defined in recipients.csv

recipients.csv

Stores the data related to recipients. The value of "name" field is will be used to replace $name in content.html, whose behavior can be modified in config.yml. The "email" field stores the recipients email. The emails will be CCed and BCCed to the emails in "cc" and "bcc" field. One recipients may have several CC and BCCs, emails should be separated with spaces. "email", "cc" and "bcc" are reserved fields, they cannot be used in html pattern, any additional field will be replaced in the html. "name" and "email" fields are required

config.yml

Configuration of each email. "subjects" defines subject, "from" defines the name recipients see in their email client. "recipientTitle" and "lastNameOnly" modifies the behavior of $name in content.html.

attachments

The attachment directory. Any file placed in this folder will be attached to the email. Any file with name started with '.' will be ignored, i.e. .git, .DS_STORE.

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

ntuee_mailer-2.0.15.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ntuee_mailer-2.0.15-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file ntuee_mailer-2.0.15.tar.gz.

File metadata

  • Download URL: ntuee_mailer-2.0.15.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Darwin/23.4.0

File hashes

Hashes for ntuee_mailer-2.0.15.tar.gz
Algorithm Hash digest
SHA256 7c7de94f9e0871be30f100d214139f4cc956099a4392ab28883922f9104a9100
MD5 e6e9ddab47d614c94a29195712d3fd42
BLAKE2b-256 8d24d232c86fd2a3785e0a4decaa87f2d93e8eef42873164e04bab4bebd74815

See more details on using hashes here.

File details

Details for the file ntuee_mailer-2.0.15-py3-none-any.whl.

File metadata

  • Download URL: ntuee_mailer-2.0.15-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Darwin/23.4.0

File hashes

Hashes for ntuee_mailer-2.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 b9ed2b2357d6828ce3269402aba49acd0cd7d0d6bfb9d98f53ed522fd52f94c8
MD5 ac71600bdc4fb4d1acc15d9213e494df
BLAKE2b-256 583fb51095ad953cfe30ce684200e6ee5e91a0f8e7135881985030f6838603a5

See more details on using hashes here.

Supported by

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