I use an external mail server to send SMTP letters, this server is uncontrollable.
Several times recently there have been problems with this mail server, and this has led to the Java application (Struts / Spring) completely freezing while waiting for a response from the mail server.
I am using Spring org.springframework.mail.javamail.JavaMailSender to send emails.
When problems arise on the external mail server, this is the next line that freezes mailEngine.send (mailMessage);
I don’t mind that sometimes emails are not sent, but how can I stop this from freezing my application while it waits for a response from the SMTP server?
Are there any good email queue solutions for Java?
source
share