Sidebar

startup_tutorial_and_checklist:feature_configuration:email_configuration:queue_within_email_feature

E-Mail Queue And Cron within Software

Some features in the software send a lot of e-mails at once and for these there is the email queue. An email queue allows emails to accumulate from different features that send them. Once in the queue the system sends those emails in that queue within bunches of 50 (by default) at regular intervals in time using cron jobs. The email queue has many benefits and alleviates issues that can happen when large amounts of emails need to be sent out at once. The software queues the e-mails so that they can be sent a few at a time, instead of all at once.

Benefits of the email queue feature include:

  • Lightens the load on the server as emails are sent over time balancing the email load on the server.
  • Helps prevent php timeout issues. If there are thousands of emails to be sent at once you could likely see php timeout issues before the full list of emails are sent. That would mean you would have lost those emails permanently.
  • Helps prevent php "out of memory" problems. If thousands of emails are to be sent at once this can cause issues server side issues just like php timeout issues can. Any emails not sent before the timeout error are lost permanently if sent all at once. But not with an email queue.
  • Helps reduce the "spam footprint" for emails sent from your system.

The queued e-mails are sent by the cron job labeled process_email_queue. You can see the cron jobs in your admin panel at Site Setup > Cron Jobs.

Some of the features that make use of the email queue are:

  • Admin Messaging System as of version 4.1.1
  • Negative Account Balance friendly reminder e-mail
  • New listing(s) that match saved filters emails as of version 7.3.0
  • Outstanding Final Fees friendly reminder e-mail notice added in 7.3.0

If "heartbeat" (default) or cron (if used) are not running on your site the emails in the email queue will not be sent.

Emails Sent By Cron

Other features use cron jobs to send emails based on a specific time without an individual triggering that it. These emails are sent on triggers like specific time before expiration where time is the trigger and not an event or user of the software. The emails sent by cron are usually one off emails. Examples of those are there:

  • subscription expiration notices
  • listing expiration notices

If "heartbeat" (default) or cron (if used) isn't running in your site these emails will not be sent.

Manually Triggering the Email Queue or Email Crons

Send e-mail queue faster: There is a way to make the e-mails that are queued in the system to be sent faster than they would normally. You can also use this technique to help diagnose problems with sending e-mails.

  1. In your admin panel, go to Site Setup > Cron Jobs.
  2. Next to the cron job named process_email_queue will be a link for [Test Run]. Click on this link.
  3. This will open up a window that will display a bunch of debug information, as it processes the e-mail queue. Most of the information will be for debugging purposes, but skim over the output and look for anything that appears to be an error message if your site is experiencing problems sending e-mails.
  4. The cron job sends the e-mails in batches of 50 e-mails every 10 minutes. So every 10 minutes, you can refresh the test run cron job page, in order to send out the next batch of e-mails.
  5. You can also manually run any cron job within the above admin tool by clicking the link next to them. This includes the emails only sent by cron/heartbeat: listing expiration and subscription expiration.
startup_tutorial_and_checklist/feature_configuration/email_configuration/queue_within_email_feature.txt · Last modified: 2015/07/14 18:23 by geojames