I\'m not familiar with this function to send mail in java. I\'m getting an error while sending email to reset a password. Hope you can give me a solution.
Below is m
You should change the port to 587, I tested your code and it's working fine
If error still happens, please change session variable to code below:
Session session = Session.getInstance(props, new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(userName, password);
}
});