Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This module provides a queues based system to manage mails.
It treats every queue item as an entity and provides a default processor to send them via Drupal core email's system.
Processors can be provided from external modules and can be selected in each queue.
Each queue can be limited by the following:
- Number of items per cron run
- Delay between one item and the next
- Number of attemps per item (Pending to implement)
Note the following things:
- At the moment this module does not use the Drupal core Queue API.
- Queue items are created programmatically (there isn't a UI for this at the moment).
INSTALLATION
Using composer:
composer require drupal/mail_entity_queue --sort-packages
CONFIGURATION
- You can add one or several Queues in Configuration > System > Mail entity queues (config/system/mail-entity-queue)
- Mail queue items are managed from Structure > Mail queue items (admin/structure/mail-entity-queue).
- You can update/delete/process each item individually from there.
USAGE
- First, create a queue from Configuration > System > Mail entity queues (config/system/mail-entity-queue)
- Using the queue machine name, load it programmatically and add items to it, for example:
$queue = \Drupal::entityTypeManager()->getStorage('mail_entity_queue')->load('my_queue'); $to = 'kimchi@example.com'; $params = [ 'subject' => 'My awesome email', 'body' => ['Body of the email'], 'headers' => [ 'From' => 'info@cambrico.net', 'Sender' => 'info@cambrico.net' ], ]; $queue->addItem($to, $params);
- Manage the queues from Structure > Mail queue items (admin/structure/mail-entity-queue)
RECOMMENDED MODULES
- Ultimate cron: https://www.drupal.org/project/ultimate_cron
- Swiftmailer: https://www.drupal.org/project/swiftmailer
- MailSystem: https://www.drupal.org/project/mailsystem
ALTERNATIVE MODULES
Queue Mail: https://www.drupal.org/project/queue_mail
SPONSORS
Supporting organizations:
Development and maintenance
Project information
- Module categories: Integrations
- 32 sites report using this module
- Created by pcambra on , updated
- Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.
Releases
8.x-1.0-alpha6
released 11 October 2023
Works with Drupal: ^9 || ^10
✓ Recommended by the project’s maintainer.
Install:
Development version: 8.x-1.x-dev updated 11 Oct 2023 at 19:22 UTC