https://github.com/ishanmk/automatic-email-sender
Automatic Email Sender Using NodeJS
https://github.com/ishanmk/automatic-email-sender
automated automatic backend email es6 javascript js mail-notification mail-notifier mailsender nodejs nodemailer notifications scheduled-notifications scheduled-tasks
Last synced: over 1 year ago
JSON representation
Automatic Email Sender Using NodeJS
- Host: GitHub
- URL: https://github.com/ishanmk/automatic-email-sender
- Owner: IshanMK
- Created: 2022-06-28T11:33:16.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-11T10:24:58.000Z (almost 4 years ago)
- Last Synced: 2023-03-05T01:25:43.630Z (over 3 years ago)
- Topics: automated, automatic, backend, email, es6, javascript, js, mail-notification, mail-notifier, mailsender, nodejs, nodemailer, notifications, scheduled-notifications, scheduled-tasks
- Language: JavaScript
- Homepage:
- Size: 23.4 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Automatic-Email-Sender
Automatic Email Sender Using NodeJS
## Download the mailSender to your PC
### Installation
```sh
git clone https://github.com/IshanMK/Automatic-Email-Sender.git
```
### Install all the modules required
* Inside the directory where package.json is located run the following code from your terminal
```sh
npm install
```
## Configuration for your Gmail Account
* Go to your [Google Account](https://myaccount.google.com/)
* Then Go to Security Tab

* Turn on 2-step verification

* After turning on 2-step verification go back now you will see new option below 2-step Verification.
* Go to the new Option App passwords

* You will get the followings

* Click on select app and choose the option Other(Custom name)

* Provide the custom name for your application and click on Generate

* It will automatically generate a password with 16 characters for your application

* Copy the password to the clipboard
## Setting Up the .env.auth file
* If you have a smtp server use it other use smtp.gmail.com as the HOST.
* The PORT regarding the smtp is 587.use 587 as HOST_PORT.
* Use gmail as the SERVICE.
* Use your own email address as EMAIL_USERNAME.
* Use the password copied to the ciplboard as the PASSWORD

## Setting Up sendEmail.js
* Provide the recipients with an array of recipients mails seperated by commas as strings.If there is only single recipient no need an array of recipients.Just provide the single email as a string
* Just Provide the scheduledDate with the Date-Time_TimeZone you want to send the email
* eg : 2022-06-28T18:16:45+05:30
* Provide sender , subject and content as you want

## Start Sending Mails
* After doing all the above steps just run the following code from your terminal
```sh
node sendEmail
```
or
```sh
npm start
```
[Find More About moment module](https://momentjs.com/)