MailConnectException while sending mail using java mail api

前端 未结 5 817
北恋
北恋 2020-12-12 05:09

Trying to send an email using java mail api. And I keep getting MailConnectException. I have tried multiple ways to solve it without success.

Exception is thrown by

5条回答
  •  情歌与酒
    2020-12-12 05:43

    For me, de-activating firewall and anti-virus did not work. I tried the alternate ports given in the mailtrap's SMTP settings 25 or 465 or 587 or 2525

    changing spring.mail.port to 2525 in the applications.properties file worked for me

提交回复
热议问题