Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kumarabhirup/bulk-mail-cli

Do quick, hassle-free email marketing with this small but very powerful tool! ๐Ÿ”ฅ
https://github.com/kumarabhirup/bulk-mail-cli

bulk-api bulk-email bulk-mail bulk-mailer bulk-mailing bulk-operation cli emailjs javascript mail mail-campaign mailchimp mailer mailgun mailgun-api nodejs nodemailer npm-package terminal

Last synced: 21 days ago
JSON representation

Do quick, hassle-free email marketing with this small but very powerful tool! ๐Ÿ”ฅ

Awesome Lists containing this project

README

        


bulk-mail-cli by Kumar Abhirup

[![Type](https://img.shields.io/badge/type-CLI-yellow.svg?style=flat-square)](https://www.npmjs.com/package/bulk-mail-cli)
[![npm](https://img.shields.io/badge/npm-bulk--mail--cli-CB3837.svg?style=flat-square)](https://www.npmjs.com/package/bulk-mail-cli)
[![Version](https://img.shields.io/npm/v/bulk-mail-cli?label=version&style=flat-square)](https://www.npmjs.com/package/bulk-mail-cli)
[![Tests](https://travis-ci.com/adventmail/bulk-mail-cli.svg?branch=master)](https://github.com/KumarAbhirup/bulk-mail-cli)
[![Twitter](https://img.shields.io/twitter/follow/kumar_abhirup.svg?style=social&label=@kumar_abhirup)](https://twitter.com/kumar_abhirup/)
[![GitHub stars](https://img.shields.io/github/stars/KumarAbhirup/bulk-mail-cli.svg?style=social&label=Stars)](https://github.com/KumarAbhirup/bulk-mail-cli)


[![pkgreview.dev Rating](https://img.shields.io/pkgreview/stars/npm/bulk-mail-cli?label=pkgreview.dev%20Stars&style=for-the-badge)](https://pkgreview.dev/npm/bulk-mail-cli)
[![pkgreview.dev Rating](https://img.shields.io/pkgreview/rating/npm/bulk-mail-cli?label=pkgreview.dev%20Rating&style=for-the-badge)](https://pkgreview.dev/npm/bulk-mail-cli)

| **Like us a lot?** Help others know why you like us! **Review this package on [pkgreview.dev](https://pkgreview.dev/npm/bulk-mail-cli)** | โžก | [![Review us on pkgreview.dev](https://i.ibb.co/McjVMfb/pkgreview-dev.jpg)](https://pkgreview.dev/npm/bulk-mail-cli) |
| ---------------------------------------------------------------------------------------------------------------------------------------- | --- | -------------------------------------------------------------------------------------------------------------------- |



# ๐Ÿ“ฆ `bulk-mail-cli`

### **Do quick, hassle-free email marketing with this small but very powerful tool! ๐Ÿ”ฅ**

#### It sends automated, dynamic and beautifully designed HTML emails to your mailing list via your terminal! ๐Ÿ˜Ž

Ever felt a quick need to shoot a fabulous mail to your subscribers? Without any inconvenience of creating complex campaigns with MailChimp and MailGun? Just open your terminal, input the CSV and HTML file with dynamic text, and just shoot the mails with **bulk-mail-cli**!

## Features

๐Ÿ’ƒ ย ย  **Active on Slack.** Join the [bulk-mail-cli Slack group](http://bit.ly/bulkmailcli) for suggestions, bugs reports, support, and core development.

๐Ÿ“ฆ ย ย  **Shoot mails using CSV**.

๐Ÿ“ ย ย  Mail **dynamic HTML Templates** using the `{{fname|lname}}` syntax.

โฐ ย ย  Set the sending **interval time** in Cron Expressions! Eg. `*/10 * * * * *`

๐Ÿ“Œ ย ย  **Unlimited attachments!** Attach any files on your local computer or you may just provide a direct URL in configuration and `bulk-mail-cli` will download and send the attachment under dynamic filenames and pathnames.

โ›…๏ธ ย ย  **Runs on cloud!** Can be run on AWS EC2 servers and on any Node.js droplet on DigitalOcean.

๐Ÿ”ฐ ย ย  **It saves your campaign progress!** You can pause and resume the Mail Campaign from where you left the last time.

โœจ ย ย  **Use .env variables** to not hardcode the emails and passwords in configuration files.

๐Ÿ‘จโ€๐Ÿซ ย ย  **Contentful demo files provided!** You get many beautiful email templates to pick from!

๐”€ ย ย  **WordPress and other CMS' friendly.** Just export the list of your users, change the email containing column name to `email` and you are good to go!

๐Ÿงช ย ย  **Tested on MacOS and Linux**.



# ๐Ÿ’ƒ Documentation

## Install `bulk-mail-cli`

Assuming that you have `node` and `npm` installed... Run the following in your terminal.

```bash
npm i -g bulk-mail-cli
```


## Get help

Just run `bulkmail support` in your terminal to see what commands and flags you can use to do awesome things.


## Generate demo Mail Templates and configuration files

To generate demo files, use the following command.

```bash
bulkmail demo
```


## Configuration file

```
{
"credentials": {
"email": "{{EMAIL}}",
"password": "{{PASSWORD}}", // turn on less-secure-apps to send emails: https://myaccount.google.com/lesssecureapps?pli=1
"host": "smtp.gmail.com", // depends on what service you are using
"port": 465, // 465 / 587
"secureConnection": true // boolean: true | false
},
"mail": {
"subject": "Heya {{fname}} {{lname}}! Just wanted to say hi!",
"from": "Chandler Bing ", // keep the format
"to": "leads.csv", // path to csv (relative to where this file is)
"theme": "themes/Newsletter/theme.html", // path to csv (relative to where this file is)
"attachments": [
// relative path to the attachment files. Keep this array `empty` if no attachments.
// SEE THE EXAMPLES BELOW.
{
"filename": "{{fname}}'s Demo CSV.csv", // You may use string patterns in fileName
"path": "leads.csv" // You may use string patterns in path too!
},
{
"filename": "{{fname}} {{lname}}'s Resume.pdf",
"path": "https://raw.githubusercontent.com/KumarAbhirup/resume/master/Kumar%20Abhirup%20CV.pdf"
}
]
},
"configuration": {
"mailInterval": "*/10 * * * * *", // Cron Expression: To mail every 10 seconds [ >= 10 seconds recommended ]
"verbose": true // boolean: True if you want a log of the live process in the terminal.
}
}
```


## Send the Mail ๐Ÿ”ฐ๐Ÿ”ฐ๐Ÿ”ฐ

```bash
EMAIL="[email protected]" PASSWORD="secret" bulkmail -f bulkmail.json # reference the configuration file here
```

That will start the mailing process! After every mail it sends, it updates the configuration file with the emails that you sent the message to. So that when you run the same campaign next time, it will resume from where you paused. **To start over, you can append the `--restart` flag to the command.**


## Writing data in CSV

### List emails the right way

If you use **WordPress**, you may just import the CSV file of users by using [this plugin](https://wordpress.org/plugins/users-customers-import-export-for-wp-woocommerce/).

- When you use that plugin, just change the `user-email` column name of the CSV file to just `email` so that to ensure no errors.

If you are feeding data from any other source or by manual means, **please for the GOD's SAKE ensure that you list emails only under the `email` column.**

If the CSV file has emails fed in some other coulumn name (such as `user-email`, `allEmails`, etc)... `bulk-mail-cli` would simply throw an error to \*_not work at all._


## Dynamic data

You may add any other column featuring custom data in the CSV. Namely `fname`, `lname`, `address`, etc... to use in the Subject and Body of your campaign mail. You can use the CSV fields everywhere in the configuration files.

### Syntax

The syntax can be used in the `email` section of the CSV and can also be used everywhere in the configuration file and HTML templates. The syntax will be processed by bulk-mail-cli to generate correct mail output.

```
{{Hi|Hello|Howdy}} ๐Ÿ™Œ

My name is {{fname}} {{lname}}.

How'yooou dooooing? ๐Ÿ˜
```

...

You can also define `PASSWORD` environment variable so that you don't directly type it in the configuration file.

#### Command

```bash
PASSWORD=ThisIsAPassword bulkmail --file bulkmail.json
```

#### Configuration

```
{
"credentials": {
...
"password": "{{PASSWORD}}"
...
}
}
```



# ๐Ÿ“ License

**GPL ยฉ [Kumar Abhirup](https://www.twitter.com/kumar_abhirup)**


_Follow me ๐Ÿ‘‹ **on Twitter**_ โ†’ [![Twitter](https://img.shields.io/twitter/follow/kumar_abhirup.svg?style=social&label=@kumar_abhirup)](https://twitter.com/kumar_abhirup/)