looking for any suggestions here. I'm really tearing my hair out over this:
Running Moodle 3.3.
Looking at the error logs, we had been getting an 'SMTP connect() error' on all outgoing emails since 11 Nov.
With debugging turned on we were getting an error which said our IP was blocked/blacklisted. but the hosting provider confirmed it is not blacklisted and a simple php mail() test sends emails just fine from the moodle root directory.
More ruthless fiddling with trying about a dozen smtp servers, checking and double checking credentials and all sorts, but I cant get a single email to send.
Now debugging is not coming up with any errors at all (without any smtp settings, trying to use php mail()) but I am still getting the SMTP error in the moodle error logs and no emails are being sent/received.
I thought this might be a phpmailer issue so I replaced lib/phpmailer with other versions from 3.4 (not working at all) 3.3 latest and eventually 3.1. No luck whatsoever.