Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

javax.mail.AuthenticationFailedException: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1

I get the following message when trying to send email from an application. Though I have the mail.jar added for my project, it still gives me the same error. Please help.

javax.mail.AuthenticationFailedException: 534-5.7.14 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 s8sm1528084ots.38 - gsmtp

at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:823) at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:756) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:673) at javax.mail.Service.connect(Service.java:295) at javax.mail.Service.connect(Service.java:176) at augCloud.SendEmailDemo$2.actionPerformed(SendEmailDemo.java:92) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$300(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

like image 604
user6814715 Avatar asked Sep 09 '16 18:09

user6814715


2 Answers

Do all these steps, otherwise the error will persists.

-You must have to log into just one gmail account (the one you are using to send email).

-Then go to https://www.google.com/settings/security/lesssecureapps and Turn On this feature.

-And last go to https://accounts.google.com/DisplayUnlockCaptcha and click Continue.

like image 127
dmarquina Avatar answered Oct 26 '22 07:10

dmarquina


Follow these steps:

  1. Go to Google account by clicking your profile picture in the top-right corner
  2. Go to Sign-in and Security_ tab
  3. Scroll down the page and check the less secure apps: OFF button
like image 38
Sagor Chowdhuri Avatar answered Oct 26 '22 07:10

Sagor Chowdhuri



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!