A script that uses Mailgun to deliver emails.
npm install -g https://github.com/CortexAG/mailgun-send-mail.git
Before running the script make sure you have created a config.json file with the following keys:
{
"domain": "<MAILGUN-DOMAIN>",
"api_key": "<MAILGUN-APIKEY>"
}
Example:
mailgun-send-mail -p register -d '{"first_name": "first_name", "token": "token"}' -c ~/code/cortex-ag/mailgun-send-mail/config.json -s "Hello there" -t costin.bleotu@cortex-ag.com
Usage: mailgun-send-mail [options]
A script that uses Mailgun to deliver emails.
Options:
-c, --config <file> Config file to use (absolute path)
-p, --template <name> Template to use from your Mailgun account
-t, --to <email> To email
-s, --subject <name> Mail subject
-d, --data <dict> Variables dict that will be sent to Mailgun template
-V, --version output the version number
-h, --help output usage information