Looking for some insight into an error I'm getting.
on transporter.sendmail(func(err, info){}), the err variable returns this:
{ [Error: getaddrinfo ENOTFOUND smtp.gmail.com]
code: 'ENOTFOUND',
errno: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'smtp.gmail.com' }
I don't see any error documentation for nodemailer on their site or github, and I haven't found anything useful on Google searches. The closest I see is this SO post. I am trying to send about 50 emails once a week through a cron job.
I have tried this with and without the nodemailer-smtp-pool package, and my transporter currently looks like this:
var transporter = nodemailer.createTransport(smtpPool({
service: 'gmail',
auth: {
user: 'xxx@gmail.com',
pass: 'xxx'
},
maxConnections: 5,
maxMessages: 200
}));
I am not using XOATH yet, because I'm not under the impression that I need to. I have removed the DisplayUnlockCaptcha for the gmail account I'm using, but I don't think that's related. For what it's worth, I'm using the MEAN stack for this app.
It looks like 'smtp.gmail.com' is not being found when nodemailer makes the getaddrinfo call, but I can't understand why.
Any insight is appreciated
edit:
from the developer of nodemailer:
ENOTFOUND means that the app was not able to resolve DNS A record for smtp.gmail.com. Probably something wrong with your DNS server. This is handled by Node and not by Nodemailer, there's nothing Nodemailer can do if a hostname is not resolved. If this happens randomly then you could edit your application to try again in a moment.
and it doesn't look like nodemailer supports proxies, or ever plans to. looks like a dead end to me.