MailConnectException: Couldn't connect to host, port: smtp.sendgrid.net

后端 未结 3 686
执笔经年
执笔经年 2020-12-12 04:43

I have created API key for sendGrid:

I have following spring mail configuration:

spring.mail.default-encoding=UTF-8
spring.mail.host=smtp.se         


        
相关标签:
3条回答
  • 2020-12-12 05:00

    You may need add something like this to your configuration.

    spring.mail.smtp.ssl.enable=true
    
    0 讨论(0)
  • 2020-12-12 05:04

    There is a probability that SendGrid SMTP servers are not discoverable in your country. try a proxy or VPN.

    0 讨论(0)
  • 2020-12-12 05:19

    I used the port 2525 (Non-privileged) instead of 578 (privileged) to solve the problem locally. I can still use the privileged one on the cloud. That solved my problem.

    0 讨论(0)
提交回复
热议问题