title: Issues configuring Nodemailer 4.6.3 with Exchange 2010 (Node.js)
body: <p>My issue is with properly configuring Nodemailer with an Exchange 2010 email server on a Node.js application.</p>
  
  <p>Because I'm not getting an authentication issue, which I do when using well-known services like Outlook365, I'm assuming the problem is with the host and/or security and port settings - I don't think I connect in the first place.</p>
  
  <p>My config below - </p>
  
  <pre><code>let transporter = nodemailer.createTransport({
    host: 'https://email.&lt;COMPANYNAME&gt;.com/owa',
    port: '587',
    secure: false,
    auth: { 
      user: &lt;USERNAME&gt;, 
      pass: &lt;PASSWORD&gt;
    },
    tls: {
      rejectUnauthorized: false
    }
  });
  </code></pre>
  
  <p>It errors here on my Node app - </p>
  
  <pre><code>transporter.sendMail(mailOptions, (error, info) =&gt; {
    if (error) {
      console.log('Send error: ', error);
      res.sendStatus(500);
    } else {
      console.log('Email sent!');
      res.sendStatus(200);
    }
  });
  </code></pre>
  
  <p>Here is the error from AWS EC2 logs -</p>
  
  <pre><code>getaddrinfo ENOTFOUND https://email.&lt;COMPANYNAME&gt;.com/owa https://email.&lt;COMPANYNAME&gt;.com/owa:587
      at errnoException (dns.js:28:10)
      at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)
    code: 'ECONNECTION',
    errno: 'ENOTFOUND',
    syscall: 'getaddrinfo',
    hostname: 'https://email.&lt;COMPANYNAME&gt;.com/owa',
    host: 'https://email.&lt;COMPANYNAME&gt;.com/owa',
    port: '587',
    command: 'CONN'
  </code></pre>
  
  <p>Nodemailer docs specify that the host "is the hostname or IP address to connect to (defaults to ‘localhost’)"</p>
  
  <p>When I try more the conventional mail.COMPANYNAME.com my requests time out. Using the address clearly hits my server and returns errors in the verification/ sending steps that I've specified. </p>
  
  <p>Again, the issue seems to be with my transporter configuration with Exchange 2010. Any help is greatly appreciated! </p>