title: How to send mail with nodemailer (node.js) by direct method?
body: <p>I try to write simple mailer just to send some text (for testing purposes) with nodemailer. If I understood well it may sent a mail by smtp or direct. At first I want to sent with DIRECT method. </p>
  
  <p>The next code very simple:</p>
  
  <pre><code>var nodemailer = require('nodemailer');
  
  var transporter = nodemailer.createTransport({direct:true,
      host: 'smtp.yandex.ru',
      port: 465,
      auth: { 
          user: 'login@yandex.ru', 
          pass: 'password' },
      secure: true
  });
  
  var mailOptions = {
      from: 'nworksheet@gmail.com',
      to: 'sky-bell@mail.ru',
      subject: 'Hello',
      text: 'This is auto mail sending'
  };
  
  transporter.sendMail(mailOptions, function (error, info) {
      if(error) {
          return console.log(error);
      }
      console.log("Message sent "+info.response)
  });
  </code></pre>
  
  <p>But I have the next error:</p>
  
  <pre><code>{ Error: Sending failed
  at QueryReqWrap.asyncCallback [as callback] (dns.js:65:16)
  at QueryReqWrap.onresolve [as oncomplete] (dns.js:216:10)
    errors: 
     [ { Error: queryMx ENOTFOUND mail.ru
       at errnoException (dns.js:28:10)
       at QueryReqWrap.onresolve [as oncomplete] (dns.js:216:19)
     code: 'ENOTFOUND',
     errno: 'ENOTFOUND',
     syscall: 'queryMx',
     hostname: 'mail.ru' } ] }
  </code></pre>
  
  <p>What does it mean? How to fix it? Node not see 'mail.ru'? Why?</p>