nodemailer 2.x configuration for Office 365 direct send
<p>I'm using nodemailer v2.4.2 with node.js v4.4.7 and I want to send emails from my server via my Office 365 SMTP mail server. I'm using the smtpTransport v2.5.0 with this configuration:</p>

<pre><code>var transporter = nodemailer.createTransport(smtpTransport({
  host: 'smtp.office365.com',
  port: 25, // have tried 465
  secureConnection: secure,
  auth: {
    user: username,
    pass: password
  },
  tls: {
    rejectUnauthorized: false // don't verify certificates
  },
  ignoreTLS: false // don't turn off STARTTLS support
}));
</code></pre>

<p>I've tried specifying an <code>authMethod</code> of <code>LOGIN</code> and <code>PLAIN</code> but neither make any difference.  When I try and send an email I get an error:</p>

<pre><code>[Error: Invalid login: 504 5.7.4 Unrecognized authentication type]
code: 'EAUTH',
response: '504 5.7.4 Unrecognized authentication type',
responseCode: 504
</code></pre>

<p>Does anyone have any idea on what authorization type is expected by Office 365 and whether I need to specify any different settings in the nodemailer setup?</p>