Handle common mistake

This commit is contained in:
M66B
2020-03-11 14:12:51 +01:00
parent ece6e29d08
commit 03cfeb6801

View File

@@ -349,6 +349,11 @@ public class EmailService implements AutoCloseable {
throw mex;
} else
throw ex;
} catch (MessagingException ex) {
if (port == 995 && !("pop3".equals(protocol) || "pop3s".equals(protocol)))
throw new MessagingException("Please double check the port number", ex);
else
throw ex;
}
}