This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public boolean checkEmailCrendentails(String hostName, String email, String password) { | |
Properties props = new Properties(); | |
props.put("mail.smtp.auth", "true"); | |
props.put("mail.smtp.starttls.enable", "true"); | |
props.put("mail.smtp.host", hostName); | |
props.put("mail.smtp.port", "25"); | |
Session session = Session.getInstance(props, new javax.mail.Authenticator() { | |
protected PasswordAuthentication getPasswordAuthentication() { |