I write this post because I need desperately your help.
I have installed Moodle 1.9.7 in a Virtual Server with Red Hat 5.4, Apache 2, PHP 5 and an Oracle Database.
The only thing that I need to solve, because it is really important for our platform is to send mail to users via smtp. It is necessary for email auttentication.
We are in an Administration Building and have and use without any problems two potential smtp servers.
I have tried different ways to configure the smtp host but I have not be able to do it. For each attempt I get differents errors but the emails are never send out.
Now I am going to show you three differents attempts with respective error messages:
1. Configuring smtp host via Moodle. (Images 1 and 2)
2. Configuring the other smtp host via Moodle. (Images 3 and 4)
3. Leaving de smtp_host paramenter blank. (Images 5 and 6).
I´ll be grateful for your help.
$ telnet mail.juntadeandalucia.es 25
What happens?
This is to check if your server actually has access to the email server. If it times out then you have a network connectivity problem, a firewall problem or the configuration of the mail server is blocking access.
If it connects then you might need to authenticate (username and password required)
I did it before but I don´t wrote it in my post.
Trying 10.240.225.171...
Connected to mail.juntadeandalucia.es (10.240.225.171).
Escape character is '^]'.
Example (done on Windows but makes no difference)...
http://www.activexperts.com/activemail/telnet/
Hi
I´m using smtp gmail account for try to send email, but I get same ERROR SMTP Error: Could not connect to SMTP host, I´m not sure if smtp of gmail is accpeting this request, but if you find any server smtp, please let me know.
Thanks a lot.
Pablo
> 220 ESMTP Thu, 08 Apr 2010 09:40:06 -0400: UCE strictly prohibited
> helo moodle
> 250 ... Hello moodle [IP]
> mail from: moodle@fpga.com.ar
> 550 bosauthsmtp10: Host IP: No unauthenticated relaying permitted
> Connection to host lost
I understand user and pass are used for authentication and they work alright from Thunderbird. I used the same setting in my moodle installation but I get the "Could not connect to SMTP server" error.
I set the debug level to "DEVELOPER" and got the following messages when trying to create a new user (and moodle tried to send an e-mail)
Warning: fsockopen() [function.fsockopen]: SSL operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in /tmp/lock/moodle/lib/phpmailer/class.smtp.php on line 106
Warning: fsockopen() [function.fsockopen]: Failed to enable crypto in /tmp/lock/moodle/lib/phpmailer/class.smtp.php on line 106
Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://mail.fpga.com.ar:25 (Unknown error) in /tmp/lock/moodle/lib/phpmailer/class.smtp.php on line 106
ERROR: SMTP Error: Could not connect to SMTP host.
Any ideas or solutions?
Thanks, Guillermo
Re: SMTP Error: Could not connect to SMTP host
Hello all,
Following the docs:
http://docs.moodle.org/en/Email_processing
http://docs.moodle.org/en/Email_setup_gmail
http://docs.moodle.org/en/Email_settings
I could send emails from Moodle using my gmail account, but that was using Moodle 2.0 P4, after Moodle 2.0 RC1 installation with the same mail configuration, I couldn't send mails, it stoped working.
Any ideas?.
Re: SMTP Error: Could not connect to SMTP host
Ok, problem solved, port 465 was missing from my configuration, sorry.
I just fixed a same issue. And I would like to contribute another possibility.
The DNS for my server is down. So server can't find the smtp server at all. Sounds very simple but it took me much time.
In Linux, after vi /etc/resolve.conf and restart network. You have to restart apache too. otherwise, it moodle still can not use the newly defined DNS.
Hope that would help somebody.