javax.mail.NoSuchProviderException: No provider for smtps

后端 未结 9 1395
离开以前
离开以前 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:43

    for the benefit of others with a similar problem as I had.

    make sure you remember to set

     properties.put("mail.transport.protocol", "smtp"));
    

    instead of

     properties.put("mail.transport.protocol", "SMTP"));
    

提交回复
热议问题