There have been a number of times when I've needed functionality from more than one module implementing drupal_mail_wrapper. It would nice if these modules could cooperate with each other. The only way to have cooperation is to create this wrapper as a hook.

Comments

mr.baileys’s picture

Can you share some use cases? I can see how it would be useful for logging/troubleshooting, but other than that I don't know...

A hook like 'hook_mail_process' or 'hook_mail_send' would be better from a DX perspective, but there is the risk of sending multiple emails when more than one module implements this hook.

mr.baileys’s picture

sun.core’s picture

Status: Active » Closed (duplicate)

Actually, I think it's a duplicate.