I'm using gmail smtp host t send mails with spring boot and JavaMail Sender :
my Mail properties :
spring.mail.host = smtp.gmail.com
spring.mail.username = XXX@gmail.com
spring.mail.password = XXX
spring.mail.properties.mail.smtp.auth = true
spring.mail.properties.mail.smtp.socketFactory.port = 465
spring.mail.properties.mail.smtp.starttls.enable = true
spring.mail.properties.mail.smtp.socketFactory.class = javax.net.ssl.SSLSocketFactory
spring.mail.properties.mail.smtp.socketFactory.fallback = false
Geting error :
Failed message 1: javax.mail.MessagingException: Could not connect to SMTP host: smtp.9business.fr, port: 25, response: 421] with root cause
even if I'm using port 465 why is he pointing to port 25 ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…