I'm trying to configure the email settings in Moodle 2.7.2. I would like to send emails via SMTP, so I give the host (mail.mydomain.com), username and password. I'm using another Moodle (2.5.2) on another server with the same email settings and it works fine. But in 2.7.2 in my new server I'm unable to send any email message...
I've got the following Moodle SMTP debug message:
SMTP -> ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution (0)SMTP connect() failed.
Is it possible that I have to configure someting in Apache?
Thanks in advance,
Network comes before application. You've not mentioned other details about your setup so suggestions below may not apply to your platform (adjust).
The error says it was 'temporary' but it also gives a hint/clue ... name resolution failed. That's network - specifically DNS.
Can't compare version 2.5 on another IP addresses server with the 2.7 on a IP address of it's own as this isn't really a moodle error but a network/network configuration error.
Do these suggested networking test from both servers. Do some DNS digs for the stmp server by it's fully qualified domain name (that's not Windows domain .... that's internet domain - ie, stmp.somenetwork.net):
Does that respond with an IP address for the smtp server? If it does, do a reverse lookup:
dig -x [theipaddressseenabove]
If the first dig didn't work, check your servers DNS settings /etc/resolv.conf.
and try dig pointing at specific DNS servers seen in the resolv.conf file. Example;
dig @[IPAddressofDNSserver] stmp.somenetwork.net
If the digs fail it might have something to do with routing and/or the switch ports the 2.7 servers is plugged into (depending upon what DNS servers are queried)
IF in resolv.conf only one DNS server @192.168.1.30 but one cannot ping nor traceroute to 192.168.1.30 then it's a network issue and no amount of config in Moodle will work ... remember ... network comes before application.
If on restarts the 2.7 server and it's resolved that fix might be only temporary. Expect the issue to rear it's ugly head again in the future until there is an investigation of networking/DNS config.
'spirit of sharing', Ken
any reason why same setting in windows install work (3.0) and dont in ubuntu server 14.04 (2.7) do not. what steps can be done to get emails flowing. really dont want to go back to the windows install. the ubuntu server install runs great just cant email