Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 2.11 KB

README.md

File metadata and controls

38 lines (25 loc) · 2.11 KB

A script written in NodeJS using nodemailer through which you can send e-mail to many mails at a single command line.

Send from a mail id that doesn't have 2 Factor Authentication

  • After installing the node modules. Make a .config file with the following credentials.

    env credentials
  • drop a .xlsx file named content in Excel folder containing Mail IDs in the first row. and create a template in the templates of the content you want to send.

  • After setting the path of template in main.js just type npm start and done!!!!

Note-> Make sure to turn on less secure app access for sending mails from your account. This can be done at https://www.google.com/settings/security/lesssecureapps

Send mail from gmail id having two-factor authentication

  • First you need to make a project in https://console.cloud.google.com/home/dashboard

  • Then under api and services add a new client oath2 id.

  • Set redirect url to https://developers.google.com/oauthplayground

  • Then go to the following url and enter your client id and secret in settings

  • then in authorize section enter https://mail.google.com and click on authorize then authorize apis and after successful authentication copy the refresh token.

    mail google
  • make a .config file with the following credentials

    env2
  • drop a .xlsx file named content in Excel folder containing Mail IDs in the first row. and create a template in the templates of the content you want to send.

  • After setting the path of template in main.js just type npm start and done!!!!