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).
Public API
Section titled “Public API”available(): bool
Section titled “available(): bool”Whether a queue backend is actually available right now.
name(): string
Section titled “name(): string”The backend’s name, as a delivery attempt records its provider.
enqueue(MailRequest $request): void
Section titled “enqueue(MailRequest $request): void”Schedule the request for asynchronous delivery.
handle(array $payload): void
Section titled “handle(array $payload): void”Deliver what one firing of the hook was scheduled with.