title: How to check email is exist or not in node js by using sendgrid
body: <p>I want to check the signup email is valid or not. (Here &quot;valid&quot; means the email exists.) I think if I receive the result from the SendGrid mailer then I can see it. But when I send the message to the signup email the result was always successful even though the email doesn't exist. Below is my code and I always got the result as status 202, instead of getting an error.
  I will be very appreciative if someone solve this problem or teach me another validation method.</p>
  <pre><code>const sgMail = require(&quot;@sendgrid/mail&quot;);
  require(&quot;dotenv&quot;).config();
  
  sgMail.setApiKey(process.env.SENDGRID_API_KEY);
  
  const sendEmail = async (options) =&gt; {
    const msg = {
      from: process.env.FROM_EMAIL,
      to: options.email,
      subject: options.subject,
      text: options.message,
      html: options.html,
    };
  
    console.log(msg);
    try {
      let result = await sgMail.send(msg);
      return true;
    } catch (err) {
      console.log(&quot;email sending error ==&gt; &quot;, err.response.body);
      return false;
    }
  };
  
  export { sendEmail };
  </code></pre>