Hi all,
Using Moodle 3.1.1
Our hosting provider recently implemented some changes to their spam filtering system and as a result it seems some of our automatic notifications are now failing to be delivered.
Specifically I have experienced the problem in relation to submission notifications - ie when a student submits an assignment the email notification that should be sent to the teachers and managers of the course is being bounced.
Below is a snippet of the "mail delivery failed" email. I have changed names to generic, First and Last stand for the first and last name of the sender and name@domain.co.za is currently my site's noreply address:
SMTP error from remote mail server after MAIL FROM:<"First Last" <name@domain.co.za>> SIZE=3353:
host 127.0.0.1 [127.0.0.1]: 501 <"First Last" <name@domain.co.za>>:
"@" or "." expected after ""First Last""I have contacted our hosting provider and they have informed me that it is as simple as it seems above. Their spam filter expects to see an "@" or a "." after the first name found in the FROM field of the header. I have been told that their is no way to white-list my domain or alter the method of spam filtering and that I need to change the code that generates the headers in my emails to remove the First Last section of the FROM header.
I have searched high and low for how I can edit the From Name out of the notification emails, however I cannot find an explanation.
I have found the $mail->FromName variable in the email_to_user function in the moodlelib.php file, however I am sure that simply removing things in here would cause problems as other parts of moodle call this function and will not get the variables required. Rather I wish there were a way to remove it from moodle's equivalent to a "template" in the "Model-Controller-View" architecture (one I am more acquainted with). This way the functions could assign the FromName variable however it would simply never be displayed.
I have read a bit about renderers in moodle however I am not sure how they work.
Does anyone have any ideas?
Kind regards
Shane