当前位置: 动力学知识库 > 问答 > 编程问答 >

Schedule emails to deliver later in a java web application if internet connection breaks or down

问题描述:

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.

分享给朋友:
您可能感兴趣的文章:
随机阅读: