Skip to content
  1. Extras
  2. Sendex
  3. Interface
  4. Email queue

Email queue

Building the queue

To send a newsletter, add messages to the queue first.

  • Go to ComponentsSendex

Building the queue - 1

  • On the Email queue tab select the newsletter in the dropdown and generate messages.

Building the queue - 2

Building the queue - 3

  • Then send the generated messages.

Sending

You can send in several ways:

  1. Manually. ComponentsSendex, Email queue tab. Select a message and send via the context menu. Sending

  2. Automatically via cron. Use core/components/sendex/cron/send.php in cron. Run frequency depends on subscriber count and hosting; the script sends up to 100 emails per run. Sent messages are removed from the queue.

  3. Via API.

    php
    $modx->addPackage('sendex', MODX_CORE_PATH . 'components/sendex/model/');
    
    $q = $modx->newQuery('sxQueue');
    $queue = $modx->getCollection('sxQueue');
    /** @var sxQueue $email */
    foreach ($queue as $email) {
      $email->send();
    }