private void createSession() { properties.put("mail.smtp.auth", "false"); //Put below to false, if no https is needed properties.put("mail.smtp.starttls.enable", "true"); properties.put("mail.smtp.host", server); properties.put("mail.smtp.port", port); session = Session.getInstance(properties);}
我认为,就足够了。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)