I have moodle 2.7
in certain cases I would moodle to email me with a certain attachment.
the closest I found is the function email_to_user()
but this function also does a lot of things that I don't because I'm not emailing a user but emailing myself (not as a user in moodle) and I don't need all the validations in email_to_user()
before I use duplicate the email_to_user() function and to make a one more suitable for me, is there a better a way? is there an email_admin() function ? or a general moodle built in function for emailing ?