Skip to content
Corex

MailQueueDispatcher

Corex\Email\Queue\MailQueueDispatcher · interface · Add-ons layer

Hands a mail request to a background queue, and delivers what it queued when the queue runs. The interface keeps QueuedMailer free of any concrete scheduler, so the queue decision is unit-testable. A dispatcher schedules its work on {@see self::HOOK}. CoreX Mail listens on that hook and calls handle() on whichever dispatcher is bound, so a dispatcher a site binds in place of the shipped ones is run by the same worker (#271).

Whether a queue backend is actually available right now.

The backend’s name, as a delivery attempt records its provider.

Schedule the request for asynchronous delivery.

Deliver what one firing of the hook was scheduled with.