How to reduce page load times by sending emails via cron, rather on page submission
A frequent problem we see at client sites is when they click submit on a page, whether it is a creation of a node or a comment, and then the site does not come back for several minutes.
The problem sometimes is due to connections to third party servers for Web 2.0 services, but can also be due to modules that send emails. For example, Organic Groups can be configured to send emails to all group members when a new post is submitted, or when someone comments on an article, ...etc.
So far, each module had to implement its own solution to this issue. For example, organic groups solves this problem by relying on the excellent job queue module. The subscriptions module has a settings for sending notifications via cron rather than at node/comment submission time.
Up until now, there was no generic way to make all emails sent from Drupal be sent when cron runs.
We wrote the queue mail module to address this requirement. It intercepts emails send from Drupal, and then uses the job queue module for the actual sending.
This way, any module that sends emails is prevented from slowing down page loads for end users.
Is your Drupal site slow?