- last update
over 1 year ago 17 pass
The queue worker function triggers the corresponding queue_mail_send drupal_alter() function before sending, as expected.
However, a queue_mail_sent hook triggered via the module_invoke_all() would be very helpful to allow further actions and processing to happen after successfully sent mails (increment counters, send statistics, sent items' archival, etc).
At least, with successfuly sent emails. As an added bonus, both success/failure cases could be covered via corresponding queue_mail_sent_success and queue_mail_sent_failed or such.
Anyway, not just restricting the hook's use case to catch failed items, but opening it to both success and failed to enable other possible usages scenarios to contrib modules.
Would like to be able to react to a failure of the send from the queue. Currently, a mail send failure is logged, but the item is deleted from the queue. Adding something like:
// Allow other modules to react to the send failure.
module_invoke_all('queue_mail_send_failure', $message);
after the log entry in the queue_mail_send() function would permit this.
Or if someone has a better idea of how to enable this, please feel free to let rip!
Needs review
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.