Username and Password not accepted when using nodemailer?

后端 未结 8 1725
悲哀的现实
悲哀的现实 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 04:52

    Make sure you are using the right port: ie port: 587 as of now.

    Visit this link to allow Less secure App access: https://myaccount.google.com/lesssecureapps

    Enable the recaptcha at this link: https://accounts.google.com/b/0/DisplayUnlockCaptcha

    Wait for a few minutes and try to send an email.

    Alternatively use sendgrid. It has a free version.

    If you are not seeing the emails in your inbox, check the Spam folder.

提交回复
热议问题