Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Do quick, hassle-free email marketing with this small but very powerful tool! 🔥

License

NotificationsYou must be signed in to change notification settings

kumarabhirup/bulk-mail-cli

Repository files navigation


bulk-mail-cli by Kumar Abhirup

TypenpmVersionTestsTwitterGitHub stars


pkgreview.dev Ratingpkgreview.dev Rating

Like us a lot? Help others know why you like us!Review this package onpkgreview.devReview us on pkgreview.dev



📦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 withbulk-mail-cli!

Features

💃   Active on Slack. Join thebulk-mail-cli Slack group for suggestions, bugs reports, support, and core development.

📦   Shoot mails using CSV.

📝    Maildynamic HTML Templates using the{{fname|lname}} syntax.

⏰    Set the sendinginterval 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 andbulk-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 toemail and you are good to go!

🧪   Tested on MacOS and Linux.



💃 Documentation

Installbulk-mail-cli

Assuming that you havenode andnpm installed... Run the following in your terminal.

npm i -g bulk-mail-cli

Get help

Just runbulkmail 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.

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 <chandlerbing@friends.com>", // 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 🔰🔰🔰

EMAIL="chandlerbing@friends.com" 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 useWordPress, you may just import the CSV file of users by usingthis plugin.

  • When you use that plugin, just change theuser-email column name of the CSV file to justemail 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 theemail column.

If the CSV file has emails fed in some other coulumn name (such asuser-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. Namelyfname,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 theemail 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 definePASSWORD environment variable so that you don't directly type it in the configuration file.

Command

PASSWORD=ThisIsAPassword bulkmail --file bulkmail.json

Configuration

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



📝 License

GPL ©Kumar Abhirup
Follow me 👋on TwitterTwitter


[8]ページ先頭

©2009-2025 Movatter.jp