title: Sending email from nodemailer for nodejs
body: <p>When I try to send email from nodemailer I get an error: EAUTH API
  I've tried to use both Hotmail and Gmail as my services as I understand from the documentation that if Gmail doesn't work, don't use it. However this does not appear to be the problem. </p>
  
  <p>I want to use this email to enable forgot password in my App</p>
  
  <p>The code:</p>
  
  <pre><code>var smtpTransport = nodemailer.createTransport({
    service: 'Hotmail',
    auth: {
      user: email,
      pass: pass
    }
  });
  
  router.post('/forgotpassword', function(req, res){
              async.waterfall([
                  function(done) {
                      User.findOne({
                          email: req.body.email
                      }).exec(function(err, user) {
                          if (user) {
                              done(err, user);
                          } else {
                              done('User not found.');
                          }
                      });
                  },
                  function(user, done) {
        // create the random token
        crypto.randomBytes(20, function(err, buffer) {
          var token = buffer.toString('hex');
          done(err, user, token);
        });
    },
    function(user, token, done) {
      User.findByIdAndUpdate({ _id: user._id }, { reset_password_token: token, reset_password_expires: Date.now() + 86400000 }, { upsert: true, new: true }).exec(function(err, new_user) {
          done(err, token, new_user);
      });
    },
    function(token, user, done) {
      var data = {
          to: user,
          from: email,
          template: 'forgot-password-email',
          subject: 'Password help has arrived!',
          context: {
              url: 'http://localhost:3000/user/reset_password?token=' + token,
              name: req.body.email
          }
      };
  
      smtpTransport.sendMail(data, function(err) {
          if (!err) {
              return res.json({ message: 'Kindly check your email for further instructions' });
          } else {
              return done(err);
          }
      });
    }
    ], function(err) {
      return res.status(422).json({ message: err });
    });
          });
  </code></pre>
  
  <p>My email and password are correct.</p>
  
  <p>The error from postman is </p>
  
  <blockquote>
    <p>{"message":{"code":"EAUTH","command":"API"}}</p>
  </blockquote>