开发者

Could not connect to SMTP host: {remote-server}, port: {port}, response: -1

开发者 https://www.devze.com 2023-04-06 14:09 出处:网络
I am trying to send mail using java mail api. But exception is come to me wit开发者_高级运维h above

I am trying to send mail using java mail api. But exception is come to me wit开发者_高级运维h above message.

Could not connect to SMTP host: {remote-server}, port: {port}, response: -1

What`s mean "response : -1"

I can`t found this code in api manual.


A response code of -1 means that JavaMail failed to get a valid response code from the SMTP server. You can view the relevant source here.

Most likely, you either have your properties set incorrectly or you have a networking issue such as a firewall blocking the connection.

You might try enabling debug mode (session.setDebug(true)). Please post your code if you need further help.

0

精彩评论

暂无评论...
验证码 换一张
取 消