title: How to use SmtpJS with Secure Token and gmail smtp
body: <p>I ve been trying to use SmtpJS to send email from client side. I have tried using this below code with gmail , and it works fine in my local and my hosted website. But I want to encrypt these data with secure token provided on Smtpjs site but when I encrypt these data it doesn't work (doesn't respond OK).</p>
  <pre><code> Email.send({
      Host : &quot;smtp.gmail.com&quot;,
      Username : &quot;myemail@gmail.com&quot;,
      Password : &quot;mypassword&quot;,
      To : 'myothermail@gmail.com',
      From : &quot;myemail@gmail.com&quot;,
      Subject : &quot;This is the subject&quot;,
      Body : &quot;And this is the body&quot;
  }).then(
    message =&gt; alert(message)
  );
  </code></pre>
  <p>This is the what I filled for secure token. I follow a tutorial on youtube using the same domain port etc it works on the video but not mine. I've changed the domain to localhost or my website domain, and change port to gmail port 465 or 587 turn on and off the SSL but still doesn't work.</p>
  <p><a href="https://i.stack.imgur.com/0dvS2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0dvS2.png" alt="enter image description here" /></a></p>