Wednesday, 17 May 2017

nodemailer gmail error: EENVELOPE

I am trying to send emails with nodemailer and I get the error: {code: "EENVELOPE", command: "API"}. I was sending emails fine with this earlier, but I just changed the gmail account from a regular email, to a noreply email. After switching and trying to send an email, I keep getting back this error. I then tried switching the email back to the account I was using before, and I still get the same error, and it was working fine with that account before.

These are the things I tried:

var transporter = nodemailer.createTransport('smtps://<user>%40gmail.com:<password>@smtp.gmail.com');

var transporter = nodemailer.createTransport({ service: 'gmail', auth: { user: '<user>@gmail.com', pass: '<password>' } });

I also tried it with the nodemailer-smtp-transport plugin:

var transporter = nodemailer.createTransport(smtpTransport({ service: 'gmail', auth: { user: '<user>@gmail.com', pass: '<password>' } }));

All of these get back the same error. When it was working before with the regular account, I was using the first configuration mentioned. Also yes I have enabled the gmail API for this account as well.



via chrispytoes

No comments:

Post a Comment