title: Verify email using NodeJS (Nodemailer) and Angular 2
body: <ul>
  <li>Hi everyone, I would like to create a service in Angular 2 that when users input their email and click the submit button, it will send an active link to their email.</li>
  <li>I used Nodemailer in NodeJS to create API sending email. Now, how I can use Angular 2 to call this API. I read articles about this issue on forum however I could not solve this. </li>
  </ul>
  
  <p>File EmailAPI.js:</p>
  
  <pre><code>var nodemailer = require('nodemailer');
  var router = express.Router();
  
  let transporter = nodemailer.createTransport({
      service: 'gmail',
      auth: {
          user: 'abc@gmail.com',
          pass: '111111'
      }
  });
  
  let mailOptions = {
      from: 'abc@gmail.com',
      to: 'xzy@gmail.com',
      subject: 'Test Mailer',
      text: 'I am testing Nodemailer to send email.',
  };
  
  transporter.sendMail(mailOptions, (error, info) =&gt; {
      if (error) {
          return console.log(error);
      }
      console.log('Message %s sent: %s', info.messageId, info.response);
  });
  </code></pre>
  
  <p>File Angular 2: email.services.ts</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { Http, Headers } from '@angular/http';
  
  
  @Injectable()
  export class EmailService {
  
    constructor(private http: Http ) { }
  
    public VerifyEmail() {
  
    }
  }
  </code></pre>