Schedule emails to deliver later in a web application

I need my web application to send thousands of per day. Currently, on being triggered by front-end user, i run a for loop in back-end which send mails.

Read this: How can I send an email by Java application using GMail, Yahoo, or Hotmail?

Issues:

  • If someone closes the web page after sending request, request is incomplete .

  • It takes long time to send email and user has to wait.

  • Ideally, i would like to save the email and content in database from where scheduler picks up the job and send email and notify the user once mail is sent/any issue occurs.

    How can i achieve this? Will cron jobs help here? What if application is deployed on windows server? Or shall i write a separate java application to pick up the tasks from database and send mail? Can i schedule a job in web application?

    链接地址: http://www.djcxy.com/p/38932.html

    上一篇: 如何在Java中计算方法的执行时间?

    下一篇: 安排电子邮件以便稍后在Web应用程序中发送