问题描述:

I am sending an email using java web application, and it works fine, but if internet connectivity is slow or down, then all other features of the application like a print of that form work fine , but emails are not delivered. So I want to send all remaining emails automatically/schedule when connectivity is good.

网友答案:

You could create an email queue by saving emails ready to send (e.g. into the database). Then a scheduled job will periodically pop the queue, check the connectivity and send the next part if the connectivity is good or just wait until the next scheduler tick hoping it will be good next time.

相关阅读:
Top