您好我需要验证我的电子邮件登录是否为真。
Properties props = new Properties();
props.put("mail.smtp.host", "smtp.gmail.com");
props.put("mail.smtp.auth", "true");
props.put("mail.debug", "true");
props.put("mail.smtp.port", 25);
props.put("mail.smtp.socketFactory.port", 25);
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.transport.protocol", "smtp");
Session mailSession = null;
mailSession = Session.getInstance(props,
new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(login, password);
}
});
登录时不存在?我如何获得登录不是真的?示例填写错误密码等谢谢