By cbondy
I have set gmail for less secure app already Also set IMAP forwarding
Locally sending emails works but the problem occurs in
digital ocean droplet [without ssl or domain] via ip address
Email Setting using java simple mail
private EmailMailer(){
setMailer(new Mailer(new ServerConfig("smtp.gmail.com", 587,EmailConstants.EMAIL_ID, EmailConstants.EMAIL_PASSWORD),
TransportStrategy.SMTP_TLS));
}
Checked Digital ocean was able to connect to port 587
Getting error while sending mail
Caused by: javax.mail.AuthenticationFailedException: 534-5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbuD
ww-app_1 | 534-5.7.14 ywow3CZ7TbpX5mHNs0LChqgXAsXoucspMfedy2oAIDqjP0MH4RO8M_1bLvhh6f3Ha0Fj_a
ww-app_1 | 534-5.7.14 RhfPx0WlDHIfsXUR8rbVLiSrSAr-hfc0PsOweMs0xMqQhHb6LhXMusyjtsfGzF> Please
ww-app_1 | 534-5.7.14 log in via your web browser and then try again.
ww-app_1 | 534-5.7.14 Learn more at
ww-app_1 | 534 5.7.14 https://support.google.com/mail/answer/78754 a6sm8956026qth.74 - gsmtp
ww-app_1 |
ww-app_1 | at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:914)
ww-app_1 | at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:825)
ww-app_1 | at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:730)
ww-app_1 | at javax.mail.Service.connect(Service.java:388)
ww-app_1 | at javax.mail.Service.connect(Service.java:246)
ww-app_1 | at javax.mail.Service.connect(Service.java:195)
ww-app_1 | at org.simplejavamail.mailer.internal.mailsender.MailSender.sendMailClosure(MailSender.java:252)
ww-app_1 | ... 59 more
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello, @cbondy
Can you confirm if you have 2 factor authentication enabled as well? I had a similar case and I’ve needed to turn less secure app ON test my code and and then turn it off again.
Have you tried doing so?
Regards, Alex
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.