DEV Community

loading...
Cover image for How I built an awesome email-marketing Command Line App with TypeScript

How I built an awesome email-marketing Command Line App with TypeScript

kumar_abhirup profile image Kumar Abhirup ・3 min read

GitHub logo adventmail / bulk-mail-cli

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


bulk-mail-cli by Kumar Abhirup

Type npm Version Tests Twitter GitHub stars


pkgreview.dev Rating pkgreview.dev Rating

Like us a lot? Help others know why you like us! Review this package on pkgreview.dev ➑ Review 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 with bulk-mail-cli!

Features

πŸ’ƒ Β Β  Active on Slack. Join the bulk-mail-cli Slack group 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…

I just created bulk-mail-cli and this post demonstrates how and why I created it.

What is bulk-mail-cli?

I hope the tweets above give a fair idea about what bulk-mail-cli is.

Journey

Being a student, I wasn't able to afford MailChimp and MailGun. Also the fact that creating bulk-mail-cli will do good to my portfolio.

So, I created the tool by myself which has all the important features that MailChimp has. Except the Mail Analytics feature. I am currently building it into the CLI.

I created v1 of bulk-mail-cli in Jan 2019. See on Product Hunt.

Since then, I got a decent number of people (20-25) to use it on a regular basis.

I also got a lot of emails about suggestions to improve it.

There were important features missing...

Like for example, Configuration of time interval to wait for each consequent email to send.

Also, there was no way to send attachments to the email list.

Also, the CLI did not run on cloud servers. It is necessary that these CLI tools run on Cloud so that the tool usage can be automated by the users.

Few feedbacks I received πŸ‘‡

Comment for #19

febr3s avatar
febr3s commented on

Hi! This app's user experience is great! Although without the interval feature cannot be used for advanced purposes. I would like to know if you're still working on it, to figure out whether I switch to another app or wait for the update. I tried myself but it was a waste of time, I guess. My best.

And I started creating...

I created the v2 in a week or two in my Highschool Xmas Vacations.

In the meanwhile, I also shared what I learned about creating Command Line Apps in the below DEV posts.

If you wanna learn how to create CLIs, the Starter Blogpost of mine might help :)

Now that the v2 is out... You can use it on everyday basis and you can also read all the code in this GitHub Repository. The repository contains documentation about how to use it.

Install bulk-mail-cli πŸ‘‰ npm i -g bulk-mail-cli and type bulkmail in the terminal for support.

Features

πŸ’ƒ Active on Slack. Join the bulk-mail-cli Slack group 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.

Technologies and Libraries used

  • TypeScript
  • Nodemailer
  • SimpleSmpt
  • csvtojson
  • ncp

The complete app is only based on nodemailer yet does so much!

Read the code

This is the prime file that runs bulk-mail-cli. Please take time to read it and you'll understand how straight forward the process is, to create a CLI.


Thank you for reading this post!

Make sure you try out bulk-mail-cli... If you spot bugs/errors, please DM me on Twitter (@kumar_abhirup)... The tool is tested on MacOS and Linux. If you are a Windows user, please let me know if things are working fine there!

About me

I am Kumar Abhirup, a 16-year-old JavaScript React developer from India who keeps learning a new thing every single day.

Connect with me on Twitter 🐦
My personal website and portfolio πŸ–₯️

Comment below your better ways, and suggestions to improve this article.Β :)

Discussion

pic
Editor guide
Collapse
newah1 profile image
Noah Doughton

Dude! This is awesome. Nice work, I'll have to try it out.

Collapse
kumar_abhirup profile image
Kumar Abhirup Author

Thank you so much! Let me know how you feel bout it!