A Node.js CLI application to email music promo to DJs. The program reads email addresses from a recipients.json file and sends an email to each recipient with a specified link to music hosted on Dropbox. This was created to make my life easier.
- Send personalised emails to multiple recipients.
- Reads email addresses from a
recipients.jsonfile. - Supports sending music promo links via Dropbox.
- Uses
nodemailerto send emails via Gmail's SMTP server.
- Node.js (v14 or above)
- Gmail account for sending emails
-
Clone this repository:
git clone https://github.com/snarelord/email-promo-sender.git
-
Navigate to the project directory:
cd email-promo-sender -
Install the dependencies:
npm install
-
Build the files:
npm run build
-
Link the package globally so it can be run from anywhere:
npm link
-
Create a
.envfile in the root of the project directory and add your Gmail credentials:EMAIL_USER=your-email@gmail.com EMAIL_PASS=your-app-password
-
Create a
recipients.jsonfile in the root directory with a list of email addresses:{ "recipients": ["email1@example.com", "email2@example.com", "email3@example.com"] } -
Edit the
optionsobject's text property to reflect your own message:// email options for each recipient const options = { from: process.env.EMAIL_USER, subject: subject, text: `<your message here> ${dropboxLink}`, };
To send an email promo with a Dropbox link use the following command anywhere on your system:
- Run the script with the desired Dropbox link and text:
send-promo "https://www.dropbox.com/example" "New music!"
This will send an email to each recipient listed in recipients.json with the specified Dropbox link.
This project is licensed under the MIT License - see the LICENSE file for details.