I am having trouble sending an email from my gmail account with my java application.
I have written simple Java code to send emails from my application. I have MFA turned on and I have created an App Password and I am using it in my code. When I execute the code I get the message
javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials ft13-20020a17090b0f8d00b0022630ba1c80sm1576429pjb.42 - gsmtp
I am fairly certain that the error message is not related to a code issue (but what do I know?) and I have double checked the credentials multiple times to ensure they are correct. I'm trying to understand what else could be the issue. I'd appreciate any advice or things to check.