Merge branch 'MDL-52780-mailoriginscript' of https://github.com/brendanheywood/moodle