0

The problem is that am getting the following error in my postman while testing email sending: enter image description here

the problem is that i'm not using the port 25 here is my code in the application.properties:

#Below Properties are needed for maintaining the session.
#Two Step verification should not be enabled for 
gmail.support.email=**********@gmail.com
spring.mail.host=smtp.gmail.com
spring.mail.port=465
spring.mail.protocol=smtps
spring.mail.username=*********@gmail.com
spring.mail.password=*********
spring.mail.properties.mail.transport.protocol=smtps
spring.mail.properties.mail.smtps.auth=true
spring.mail.properties.mail.smtps.starttls.enable=true
spring.mail.properties.mail.smtps.timeout=8000

An other caption from the sts error :

enter image description here

enter image description here

where is the problem exactly ? and how could it be generation the port 25 error?

ELLA
  • 11
  • 4
  • Are you trying to connect via TLS or SSL? Your properties include some of both. Port 465 is for SSL. For TLS you should be using port 587. See https://mkyong.com/Java/javamail-api-sending-email-via-gmail-smtp-example/ for an example of how to connect using both means. – Lee Greiner Apr 30 '21 at 14:11
  • @LeeGreiner Thank you so much that helped me solve the issues. – ELLA May 28 '21 at 11:41

0 Answers0