SMTP login failed - password=<null>
-
Hello!
I configure the smtp.gmail.com as SMTP server, providing valid Username and Password.
When I try "Send tests email" I get an error:
Unable to send email via JavaMail
Prime Messaging ExceptionLogs:
2023-05-26 12:19:07 DEBUG: Jakarta Mail version 2.0.1 2023-05-26 12:19:07 DEBUG: successfully loaded resource: /META-INF/javamail.default.providers 2023-05-26 12:19:07 DEBUG: Tables of loaded providers 2023-05-26 12:19:07 DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPTransport=jakarta.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle], com.sun.mail.imap.IMAPSSLStore=jakarta.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], com.sun.mail.pop3.POP3Store=jakarta.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle], com.sun.mail.smtp.SMTPSSLTransport=jakarta.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], com.sun.mail.imap.IMAPStore=jakarta.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], com.sun.mail.pop3.POP3SSLStore=jakarta.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle]} 2023-05-26 12:19:07 DEBUG: Providers Listed By Protocol: {imap=jakarta.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], smtp=jakarta.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle], pop3=jakarta.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle], imaps=jakarta.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], smtps=jakarta.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], pop3s=jakarta.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle]} 2023-05-26 12:19:07 DEBUG: successfully loaded resource: /META-INF/javamail.default.address.map 2023-05-26 12:19:07 DEBUG: getProvider() returning jakarta.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle] 2023-05-26 12:19:07 DEBUG SMTP: need username and password for authentication 2023-05-26 12:19:07 DEBUG SMTP: protocolConnect returning false, host=smtp.gmail.com, user=test.user1@stalker.io, password=<null> 2023-05-26 12:19:07 DEBUG SMTP: useEhlo true, useAuth true 2023-05-26 12:19:07 DEBUG SMTP: trying to connect to host "smtp.gmail.com", port 465, isSSL true 2023-05-26 12:19:07 220 smtp.gmail.com ESMTP c11-20020adfe74b000000b0030630120e56sm1769084wrn.57 - gsmtp 2023-05-26 12:19:07 DEBUG SMTP: connected to host "smtp.gmail.com", port: 465 2023-05-26 12:19:07 EHLO 4e8d752d89ce 2023-05-26 12:19:07 250-smtp.gmail.com at your service, [31.33.188.176] 2023-05-26 12:19:07 250-SIZE 35882577 2023-05-26 12:19:07 250-8BITMIME 2023-05-26 12:19:07 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH 2023-05-26 12:19:07 250-ENHANCEDSTATUSCODES 2023-05-26 12:19:07 250-PIPELINING 2023-05-26 12:19:07 250-CHUNKING 2023-05-26 12:19:07 250 SMTPUTF8 2023-05-26 12:19:07 DEBUG SMTP: Found extension "SIZE", arg "35882577" 2023-05-26 12:19:07 DEBUG SMTP: Found extension "8BITMIME", arg "" 2023-05-26 12:19:07 DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH" 2023-05-26 12:19:07 DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg "" 2023-05-26 12:19:07 DEBUG SMTP: Found extension "PIPELINING", arg "" 2023-05-26 12:19:07 DEBUG SMTP: Found extension "CHUNKING", arg "" 2023-05-26 12:19:07 DEBUG SMTP: Found extension "SMTPUTF8", arg "" 2023-05-26 12:19:07 DEBUG SMTP: protocolConnect login, host=smtp.gmail.com, user=test.user1@stalker.io, password=<non-null> 2023-05-26 12:19:07 DEBUG SMTP: Attempt to authenticate using mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM XOAUTH2 2023-05-26 12:19:07 DEBUG SMTP: Using mechanism LOGIN 2023-05-26 12:19:07 DEBUG SMTP: AUTH LOGIN command trace suppressed 2023-05-26 12:19:07 DEBUG SMTP: AUTH LOGIN failed
Settings:
-
Well, I was not attentive enough to review all the topics here, and there is the answer:
@dan said in Having trouble using Gmail SMTP for email sending:
Found a way to solve it.
You really need to use 16-char app passwords with Google SMTP, as it is suggested here https://support.google.com/accounts/answer/185833
It works fine then.
Probably you should note that in the smtp-related documentation.
-
-
@spielmitmir2006 Awesome, glad you figured it out!
-
Also, I added some documentation to help folks to find this easier: https://github.com/FusionAuth/fusionauth-site/pull/2219
Should be live in a few minutes.