Hi, I've recently configured a moodle site for a customer where due to their internal polices, use a SMTP relay for email sending. They provided all parameters to configure outgoing email at Site administration > server > test outgoing email config and indicated that server does not require authentication and works with any dummy email.
After complete configuration and try to test (using built-in test outgoing message feature) the result is an error showing:
2022-09-19 13:34:41 SMTP Error: Could not authenticate. 2022-09-19 13:34:41 CLIENT -> SERVER: QUIT 2022-09-19 13:34:41 SERVER -> CLIENT: 221 2.0.0 Service closing transmission channel 2022-09-19 13:34:41 Connection: closed 2022-09-19 13:34:41 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
The weird thing is that when I use telnet to test email sending from server, everything goes well.
Something similar happens when try to use one feature that needs to send email (self registration for new user):
Debug info:
- line 498 of /lib/setuplib.php: moodle_exception thrown
- line 142 of /auth/email/auth.php: call to print_error()
- line 99 of /auth/email/auth.php: call to auth_plugin_email->user_signup_with_confirmation()
- line 92 of /login/signup.php: call to auth_plugin_email->user_signup()
Any idea?
Thanks,
Joel
Moodle 3.9.1 (Build: 20200713), Cron executing every minute and log showing SMTP connect() failed