title: Getting error while sending email through Gmail
body: <p>Here I am trying to send mail using gmail but getting error below</p>
  
  <pre><code>  javax.mail.AuthenticationFailedException: 534-5.7.14 
    &lt;https://accounts.google.com/ContinueSignIn? 
    sarp=1&amp;scc=1&amp;plt=AKgnsbu7f
    534-5.7.14 Zt- 
    ibTxZf1iCvRrx_zqZ2e0gyU7UDBdKNf3Skj3y1daBQ4lwKDtlbWjuZVSBdqqJvWssPG
    534-5.7.14 
    axQ9afV4DYvgwRA6V94E2JKjGlqxgk8V7wxG9-lgPZoqbzI4rgBIk8SjDYwFt06r7tzWjs
  
    534-5.7.14 gn4zN1UWm-
   _BhrTGzjP02vV710gi2NHsgX7efxMTbZSowI02n1DL31Qhf_ba5vvtN8mSkI
    534-5.7.14 mutNhiGJSG0_sSI0ZAiblBGGfc1o&gt; Please log in via your web browser and
    534-5.7.14 then try again.
    534-5.7.14  Learn more at
    534 5.7.14  https://support.google.com/mail/answer/78754     vy6sm35491986pac.38 - gsmtp
  
  at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:648)
  at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:583)
  at javax.mail.Service.connect(Service.java:295)
  at javax.mail.Service.connect(Service.java:176)
  </code></pre>
  
  <p>I have been logged-in successfully inside my web browser but getting error while sending through code. I haven't activated 2-step verification.
  I am following these <a href="https://stackoverflow.com/questions/46663/how-can-i-send-an-email-by-java-application-using-gmail-yahoo-or-hotmail">link</a></p>