Asynchronous sending mails in registration and mass mail process

  • Sascha Buchda
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 day 13 hours ago #171868 by Sascha Buchda
What is the problem to be solved?

Currently, sending of registration emails runs synchronously in the registration process. When registering for an event by pressing the "Submit" Button registration is done quite quickly. However, the page ias frozen for the time until the mail provider sending the mail returns successful mail delivery (referred to as synchronous behaviour of regisration process. This also applies to sending of mass mail from frontend or joomla backend. In case of higher volumes in a short amount of time, this may result in (apache) webserver timeouts (white error page), though the registration it self succeed - onyl sending of registration mails could not be completed in the timeframe of the webservers timeout window. This leads to duplicated registrations as users retry registration thinking the first attempt failed.

Actions taken to address the issue
  1. Increase of apache webserver timout to 2 minutes.
  2. Configration of high volume sending of mails with mail provider, in order not to slow down sending of mails artificially (prevention of bulk spam sending on privider side).
What is the suggestion / wished freature?

The actions taken do not resolve the root cause of the problem. In case of higher volumes the problem still persists. Therefore, I would like to suggest to decouple mail sending with the provider during the registration process from the registration process itself. This maybe achieved by setting up a mail queue, that is used by the registration process to keep track of registration process to be send. Another scheduled process performs the sending of the mails asynchronously and independelty from the registration process. The same process could be used for asynchronous sending of mass mails. 

Please Log in or Create an account to join the conversation.

More
20 hours 8 minutes ago #171877 by Tuan Pham Ngoc
That make sense. I have been thinking about this for sometime. Will try to find a way to support it in the future

Regards,

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc