title: NodeMailer : getaddrinfo Error
body: <p>Looking for some insight into an error I'm getting. </p>
  
  <p>on transporter.sendmail(func(err, info){}), the err variable returns this:</p>
  
  <pre><code>{ [Error: getaddrinfo ENOTFOUND smtp.gmail.com]
    code: 'ENOTFOUND',
    errno: 'ENOTFOUND',
    syscall: 'getaddrinfo',
    hostname: 'smtp.gmail.com' }
  </code></pre>
  
  <p>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 <a href="https://stackoverflow.com/questions/25270562/node-js-smtp-error">this SO post</a>. I am trying to send about 50 emails once a week through a cron job. </p>
  
  <p>I have tried this with and without the nodemailer-smtp-pool package, and my transporter currently looks like this:</p>
  
  <pre><code>var transporter = nodemailer.createTransport(smtpPool({
    service: 'gmail',
    auth: {
      user: 'xxx@gmail.com',
      pass: 'xxx'
    },
    maxConnections: 5,
    maxMessages: 200
  }));
  </code></pre>
  
  <p>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.</p>
  
  <p>It looks like 'smtp.gmail.com' is not being found when nodemailer makes the getaddrinfo call, but I can't understand why.</p>
  
  <p>Any insight is appreciated</p>
  
  <p>edit:</p>
  
  <p>from the developer of nodemailer:</p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>and it doesn't look like nodemailer supports proxies, or ever plans to. looks like a dead end to me. </p>