ERROR: SMTP Error: Could not connect to SMTP host.

Re: NEW ISSUE: ERROR: SMTP Error: Could not connect to SMTP host.

by Sameer Choudhary -
Number of replies: 2

Hi,

I got a solution for moodle3.2

Go to site administrator --> Server --> Email --> outgoing Mail Configuration and configure it as below

First just follow  https://docs.moodle.org/32/en/Email_setup_gmail

Go to wamp\bin\apache\apache2.4.23\bin\php.ini

;extension=php_openssl.dll  ---> remove ; to uncomment it if it is not
Than restart wamp

Go to this url -->
https://www.google.com/settings/security/lesssecureapps and turn it on

Install plugin eMail Test to test

It worked for me.

In reply to Sameer Choudhary

Re: NEW ISSUE: ERROR: SMTP Error: Could not connect to SMTP host.

by Anirudh Phadke -

Hi Sameer,

I have been trying to configure our Exchange Email Id on Moodle but it just doesn't work at all. I would have tried your suggestion on a Gmail id but we can't restart Wamp as the server has other properties running on it.

The Exchange server setting gives the attached error log on eMail Test. 

Is there anything I can do to get this working?

-Anirudh


In reply to Anirudh Phadke

Re: NEW ISSUE: ERROR: SMTP Error: Could not connect to SMTP host.

by Anirudh Phadke -

I removed the smtp settings and changed all to default (blank) and the mail is now being sent. But they all land in Spam. Is there any way to avoid getting spammed?