-
Improvement
-
Resolution: Unresolved
-
Minor
-
2.3, 2.8, 3.7
-
MOODLE_23_STABLE, MOODLE_28_STABLE, MOODLE_37_STABLE
-
wip-MDL-27081-master
I am creating a module that needs to send multiple attachments in an email to a user and found that the current implementation of 'email_to_user' in the latest stable build of Moodle doesn't support that functionality.
I saw how another module, Quickmail2, implemented multiple attachments and they basically just copied the entire function "email_to_user" and called it "modified_email_to_user".
However, I wish to avoid doing it this way, because then any fixes or improvements to 'email_to_user' would be on the onus of the module developer, which can't be good for security/stability updates.
I have submitted a simple patch for supporting multiple attachment in core Moodle's moodlelib.php/email_to_user function by taking what was done in Quickmail2 and adding in the ability to support single attachments are they are right now, but adding in the option to have multiple attachments without any API changes.