javax.mail.NoSuchProviderException: No provider for smtps

后端 未结 9 1390
离开以前
离开以前 2020-12-11 16:14

I\'m trying to set up my Java project to be able to send e-mail (via g-mail, if it matters) and am getting \"javax.mail.NoSuchProviderException: No provider for smtps\" ever

9条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-11 16:53

    Just in case anyone makes the same mistake as I have: you have to use lowercase letters for the protocol resolving to work. If you type SMTP as a protocol name instead of smtp you will get the NoSuchProviderException. It most likely works the same way for all other providers.

提交回复
热议问题