title: how to friend invite send to mail?
body: <p>(Update)Hi all i want to invite friend sent to mail using <code>Nodejs</code>. Mainly server side <code>user</code> and <code>pass</code> which can be use? and mail also can't sent then i tried many ways but unable to get the solution if any one knows the solution please help me.....
  <a href="https://plnkr.co/edit/PnUhzp8xVNoNpCMWvkUC?p=preview" rel="nofollow">myplunker</a></p>
  
  <p><strong>HTML:-</strong></p>
  
  <pre><code>&lt;div id="container"&gt;
  &lt;center&gt;   
  &lt;input id="to" type="text" placeholder="Enter E-mail ID" /&gt;&lt;br&gt;&lt;br&gt;
  &lt;input id="subject" type="text" placeholder="Write Subject" /&gt;&lt;br&gt;&lt;br&gt;
  &lt;textarea id="content" cols="40" rows="5" placeholder="Message"&gt;&lt;/textarea&gt;&lt;br&gt;&lt;br&gt;
  &lt;button id="send_email"&gt;Send Email&lt;/button&gt;
  &lt;/center&gt;
  &lt;span id="message"&gt;&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>Server:-</strong></p>
  
  <pre><code>var smtpTransport = nodemailer.createTransport("SMTP",{
      service: "Gmail",
      use_authentication: true,
      auth: {
          user: "sample@gmail.com",
          pass: "password"
      }
  });
  
  
  app.get('/',function(req,res){
      res.sendfile('index.html');
  });
  app.get('/send',function(req,res){
      var mailOptions={
          to : req.query.to,
          subject : req.query.subject,
          text : req.query.text
      }
      console.log(mailOptions);
      smtpTransport.sendMail(mailOptions, function(error, response){
       if(error){
              console.log(error);
          res.end("error");
       }else{
              console.log("Message sent: " + response.message);
          res.end("sent");
           }
  });
  });
  </code></pre>