emailjs: Gmail smtp not working

Hie,

I have been using emailjs quite for some time and since last evening i was unable to send emails.

The following are the error codes I am getting all different times. 1st time: error : code 7 error : smtp undefined

2nd time:

error : code 3 error : previous { [Error: bad response on command ‘AUTH’] code: 2, smtp: ‘250 CHUNKING\n’ } error : smtp undefined

My code is: var ES = require(‘./email-settings’); var EM = {}; module.exports = EM;

EM.server = require(“emailjs/email”).server.connect({

host        : ES.host,
user        : ES.user,
password    : ES.password,
ssl         : true

});

EM.dispatchResetPasswordLink = function (account, callback) { EM.server.send({ from: ES.sender, to: account.email, subject: ‘Password Reset’, text: ‘something went wrong… 😦’, attachment: EM.composeEmail(account) }, callback); };

EM.dispatchWelcomeMessage = function (account, callback) { EM.server.send({ from: ES.sender, to: account.email, subject: ‘Welcome to Brainwave’, text: ‘Welcome to Brainwave’, attachment: EM.composeWelcome(account) }, callback); };

I am using normal authentication and no two step authentication is being used .

What exactly is the issue can anyone fix this?

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 31 (5 by maintainers)

Most upvoted comments

I just had the same problem using winston-mail and this worked for me

  1. Login to your gmail account.

  2. Go to https://www.google.com/settings/security/lesssecureapps and Turn On this feature.

  3. Go to https://accounts.google.com/DisplayUnlockCaptcha and click Continue.

source https://serverfault.com/a/745666

suddenly for no reason i started getting this error too.

"emailjs": "^1.0.8",