Java mail without ssl - PKIX path building failed:

后端 未结 3 1377
感动是毒
感动是毒 2020-12-19 08:59

I am using java mail to send emails over smtp. The smtp settings given below:

        Properties props = new Properties();
        Object put = props.put(\"m         


        
3条回答
  •  无人及你
    2020-12-19 09:22

    This JavaMail FAQ entry should help.

    Try using MailSSLSocketFactory like this:

      MailSSLSocketFactory sf = new MailSSLSocketFactory();
      sf.setTrustAllHosts(true);
      props.put("mail.smtp.ssl.socketFactory", sf);
    

提交回复
热议问题