any Event able to capture an EMAIL sending?

Created on 17 July 2025, 15 days ago

Problem/Motivation

I'd like to find a way to react to the sending of an email, so that i could know the content, the subject, the time of sending and who the mail was sent to.
This is what I believe that I need, so as to use ECA to implement a SECOND MAIL registered in the Users' profile, and to make this 2nd email also receive a password recovery message.
If there is another way to do that, so that something like an "Email Has Been Sent" Event to be available, I'd be glad to learn about!
Thanks!

Feature request
Status

Active

Version

2.1

Component

User interface

Created by

🇧🇷Brazil marco aurelio rocca

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @marco aurelio rocca
  • 🇩🇪Germany jurgenhaas Gottmadingen

    I don't think that's possible as there are so many different ways of sending emails. And for the ootb mail feature of Drupal core, I know there is a hook to alter the mail content, but there is no hook or event that's dispatched with the final email. And then, if you used a different mail handler like e.g. SMTP or Symfony Mailer, the whole process of sending emails would again be different.

  • 🇧🇷Brazil marco aurelio rocca

    Ok, Jurgenhaas, think I get the point.
    Thank you again so much!

Production build 0.71.5 2024