semplon / php-smtp-email-validation

Automatically exported from code.google.com/p/php-smtp-email-validation
0 stars 2 forks source link

Connection timeout error with port no 25 when code run on web server #37

Open babitabhandari opened 8 years ago

babitabhandari commented 8 years ago

when i try to check any email address exist or not by SMTP by PHP script. getting following error..... Warning: fsockopen(): unable to connect to gmail-smtp-in.l.google.com:25 (Connection timed out) in /home/mail/smtp_validateEma‌​il.class.php on line 155

if ($this->sock = fsockopen($host, $this->port, $errno, $errstr, (float) $timeout)) { stream_set_timeout($this->sock, $this->max_read_time); break; } }

THe code is working on localhost but did not work on web server it gives connection time out error and fsockopen() error on line 155 of file smtp_validateEma‌​il.class.php.

someone suggest me to change port no i have changed port no 25 to 587 but still get this error. Please solve this problem.