Jump to content

Connecting To External Smtp Server


kotha

Recommended Posts

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!

Link to comment
Share on other sites

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:

2017_01_31_12_10_09_Mozilla_Firefox.png

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

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..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...