kotha Posted January 30, 2017 Posted January 30, 2017 Hi Admin, Last few days I had an working php script which allowed me to send email using PHP PEAR by connecting to an external SMTP server (smtp.yandex.com). However, since last 2 days probably I can see that the php script is unable to connect to the smtp server and thus not being able to send emails. I have tested with following script to find out that somehow, heliohost is probably blocking the access to the smtp server / port. Since, I found this script being able to connect from a different php host. Can you please check and let me know what went wrong recently that I'm unable to connect to smtp server in question.Test Script: <?php $timeout = 30; // your own timeout value $connection_type = 'ssl'; // may be ssl, sslv2, sslv3 or tls $host = 'smtp.yandex.com'; $port = 465; $fp = stream_socket_client("{$connection_type}://{$host}:{$port}", $errno, $errstr, $timeout); if (!$fp) { echo "$errstr ($errno)"; } else { echo "Connection established"; } ?> Looking forward for your help! Quote
kotha Posted January 31, 2017 Author Posted January 31, 2017 Does it work now? No, It's still not working... I'm getting a connection timeout message... Connection timed out (110)The script snippet given above is hosted at:http://kotha.heliohost.org/testmail.php Quote
Krydos Posted January 31, 2017 Posted January 31, 2017 Your link says connection established now. Quote
kotha Posted January 31, 2017 Author Posted January 31, 2017 Your link says connection established now. This is kind of strange... I have been re-trying a number of times since your last reply, but still getting same timeout message.To rule out possibilities of cached results, I have even tried accessing from different browsers, including my mobile browser over a different internet connection (though this has nothing to do with my internet connection). Attached is the screenshot: Quote
kotha Posted January 31, 2017 Author Posted January 31, 2017 Update:I see it working now, and getting "Connection established" message. Hope this problem solved completely... I will get back if the problem re-appears. Hope not... Quote
kotha Posted January 31, 2017 Author Posted January 31, 2017 Update:I see it working now, and getting "Connection established" message. Hope this problem solved completely... I will get back if the problem re-appears. Hope not... Dear Admin...The problem is occurring again, it's giving connection timeout error.. Please help me with a stable solution. Thanks! Quote
Krydos Posted January 31, 2017 Posted January 31, 2017 Here's why http://bybyron.net/php/tools/dns_records.php?domain=smtp.yandex.com&rec=A I whitelisted the result of typing 'ping -c 1 smtp.yandex.com' but since there are five A records that means your script will work about 20% of the time. Now that all 5 IPs are whitelisted it should work 100% of the time. 1 Quote
kotha Posted February 1, 2017 Author Posted February 1, 2017 Here's why http://bybyron.net/php/tools/dns_records.php?domain=smtp.yandex.com&rec=A I whitelisted the result of typing 'ping -c 1 smtp.yandex.com' but since there are five A records that means your script will work about 20% of the time. Now that all 5 IPs are whitelisted it should work 100% of the time. Thanks! It's resolved now... Quote
kotha Posted March 27, 2017 Author Posted March 27, 2017 Dear Admin, I am opening up this old thread again since the same problem have re-surfaced again. My application is unable through smtp.yandex.com as I am getting connection timed out message. A connection test script can be found at http://kotha.heliohost.org/testmail.php The issue is occurring since 24th March, approximately. Quote
Krydos Posted March 27, 2017 Posted March 27, 2017 I restarted the firewall on Tommy and it seems to be working now. Quote
kotha Posted March 28, 2017 Author Posted March 28, 2017 I restarted the firewall on Tommy and it seems to be working now.It is working now. Thanks! Quote
kotha Posted May 6, 2017 Author Posted May 6, 2017 Dear Admin, This same issue is happening again. Please look into the matter urgently. You can also test if it's working by going to the url already mentioned in previous post in this thread. The issue has started since last 24hours approximately. Expecting your fast resolution.. Quote
Krydos Posted May 6, 2017 Posted May 6, 2017 I restarted the firewall and your test file is working again. Quote
kotha Posted May 7, 2017 Author Posted May 7, 2017 After your firewall restart it worked for for few hours, again same problem.I am fed up... please give a permanent solution. Respond at the earliest pls. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.