I am getting this error: Could not connect to SMTP host: smtp.gmail.com, port: 25;

479 views Asked by At

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?

0

There are 0 answers