Username and Password not accepted when using nodemailer?

后端 未结 8 1716
悲哀的现实
悲哀的现实 2020-12-03 04:44

This is my settingController:

var sendSmtpMail = function (req,res) {
  var transport = nodemailer.createTransport({
  service:\'gmail\',
   auth: {
                 


        
相关标签:
8条回答
  • 2020-12-03 05:06

    You have to allow Less-Secure-Apps to access account settings in your google account - by default, this setting is off and you can simply turn it on. Image example

    0 讨论(0)
  • 2020-12-03 05:14

    I encountered the same problem, i solved it as follows:

    1. GOTO https://admin.google.com and Login with the main account you used for setting up the business account and create users. Remember to use the main Email ID.

    1. Click on the Security Icon and you'll be taken to this page where you'll see Less secure apps section, click on it.

    2. Now You'll see this, allow users or give permission here.

    3. And you're not done yet, Not Go to the below link: https://myaccount.google.com/u/1/lesssecureapps

    Now you'll see the switch. Enable it and try it'll definitely work.

    Peace :)

    0 讨论(0)
提交回复
热议问题