Package: ntuee-mailer
ntuee-mailerThis is a simple mailer for NTU students to send letters in batches.Installation$pipinstallntuee-mailerUsage:$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 templatesend: send emails to a list of recipients as...ntuee-mailer checkcheck wether a directory is a valid lettera letter folder should be structured as follows:letter_name
├── attachments
│ ├── ...
│ └── ...
├── config.yml
├── content.html
└── recipients.csvUsage:$ntuee-mailercheck[OPTIONS]LETTER_PATHArguments:LETTER_PATH: Path to letter directory [required]Options:--help: Show this message and exit.ntuee-mailer configconfigure the auto mailera 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 DoeUsage:$ntuee-mailerconfig[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 newcreate a new letter from templateUsage:$ntuee-mailernew[OPTIONS]LETTER_NAMEArguments:LETTER_NAME: Name of letter [required]Options:--help: Show this message and exit.ntuee-mailer sendsend emails to a list of recipients as configured in your letterUsage:$ntuee-mailersend[OPTIONS][LETTER_PATH]Arguments:[LETTER_PATH]: Path to letterOptions:-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 testUsage:$ntuee-mailertest[OPTIONS]Options:--help: Show this message and exit.mail formata letter folder should be structured as follows:letter_name
├── attachments
│ ├── ...
│ └── ...
├── config.yml
├── content.html
└── recipients.csvcontent.htmlThe content of the email.$<pattern>would be replaced by the corresponding field defined inrecipients.csvrecipients.csvStores the data related to recipients. The value of "name" field is will be used to replace$nameincontent.html, whose behavior can be modified inconfig.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 requiredconfig.ymlConfiguration of each email. "subjects" defines subject, "from" defines the name recipients see in their email client. "recipientTitle" and "lastNameOnly" modifies the behavior of$nameincontent.html.attachmentsThe 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.