-
Improvement
-
Resolution: Duplicate
-
Minor
-
None
-
2.9.1, 3.0.2
-
MOODLE_29_STABLE, MOODLE_30_STABLE
-
MDL-51386-master -
For student and staff support, it is sometimes useful to have a log of emails successfully sent out (at least, handed off to the smtp server without an error).
E.g. If a student complains they weren't notified of the assignment being graded, the log can be reviewed to see if the email was sent.
There are three approaches to logging that I can think of, all modifying email_to_user():
- Add a new \core\event\email_sent event, to complement \core\event\email_failed in lib/moodlelib.php
- Seems like the best use of the Moodle APIs.
- However, built-in reporting tools don't seem easy to query.
- Would probably be coded to only record the metadata (from/to/subject/date).
- BCC all sent emails to an admin email account, via a setting like $CFG->bccmails
- Creates an archive of the entire email, including the body - which could be good or bad, depending on one's requirements.
- Requires an email account suitable for high-volume traffic.
- Log all sent emails to a log file on the server (my current hack).
- Not accessible from Moodle interface.
- Easy to grep if one has CLI access.
Is this worth including? Which approach would be best?
- duplicates
-
MDL-53023 Add email message deliver-ability and engagment tracking and reporting
-
- Reopened
-
- has a non-specific relationship to
-
MDL-69724 Add a mail filtering and mutation api
-
- Open
-
- has been marked as being related by
-
MDL-45160 Extend messaging system to log messages sent, and provide reports
-
- Closed
-
- is blocked by
-
MDL-52991 Add filtering to logstore_standard to allow selective logging of events
-
- Closed
-
- is duplicated by
-
MDL-64842 Log outgoing mail
-
- Closed
-
- will be (partly) resolved by
-
MDL-53023 Add email message deliver-ability and engagment tracking and reporting
-
- Reopened
-