Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a hard time having the 'write to temporary file directory' mail logger useful. I can't see the results right as I'm executing the mail action in the UI. I propose we add a DevelDebugMailLog which uses dpm() and watchdog() to record the mails. I think this would be incredibly useful for not just myself, so I'm proposing that the HelperDebugMailLog from http://drupal.org/project/helper be merged into devel.
Related:
#1246978: Include mail debug option
#1228590: Mail logging settings and email logging to watchdog
Comment | File | Size | Author |
---|---|---|---|
#1 | 1978250-devel-debug-mail-log.patch | 1.94 KB | Dave Reid |
Comments
Comment #1
Dave ReidComment #2
salvisI like this, thank you! I've done something similar myself, and having it in Devel would make sense.
Are you proposing to add yours to the existing one? The changed documentation comment still mentions only the existing one.
Not sure which one is more "Debug" -- maybe DevelUIMailLog would be a better name?
README.txt needs to be updated, too.
They're really MailSystems, not just MailSystemInterfaces.
I'd vote for showing the new one here, if not both.
Comment #3
moshe weitzman CreditAttribution: moshe weitzman commentedLets do D8 first.
DevelDebugMailLog should be its own file, like DevelMailLog.php. Also see composeMessage() method from that file. We might borrow parts of that?
Perhaps use config() variable to say if user wants dpm(), watchdog, or both?
Comment #4
pcambraComment #5
moshe weitzman CreditAttribution: moshe weitzman commentedFYI, D8 core provides a mail system implementation that saves to State. See test_mail_collector
Comment #6
lussolucaWebprofiler has a datacollector that collects sent email, so maybe we can use it in combination with DevelMailLog to provide an easy way to explore email data.
Comment #7
moshe weitzman CreditAttribution: moshe weitzman commentedThis got done \Drupal\devel\Plugin\Mail\DevelMailLog