|
|
 Konstantin Granin - 2010-12-06 11:09:26
When using this class in my work, I found some problems.
for detect the problem, must be supplemented by the condition in a loop foreach (method check)
foreach ($mxs as $host) {
if ($fp = fsockopen($host, $this->_port, $errno, $errstr, $this->_timeout)) {
stream_set_timeout($fp, $this->_timeout);
$reply = fgets($fp);
preg_match('/^(?<code>[0-9]{3}) (.*)$/ims', $reply, $matches);
$code = isset($matches['code']) ? $matches['code'] : '';
if ($code = '220') {
break;
} else {
fclose($fp);
}
} else {
echo 'HOST: '.$host.'<br>';
echo 'error No: '.$errno.'<br>';
echo 'error Msg: '.$errstr.'<br>';
}
}
1. On your server there is a firewall which locks connections with other servers.
example.php displays an error message:
HOST: gmail-smtp-in.l.google.com
error No: 13
error Msg: Permission denied
HOST: alt1.gmail-smtp-in.l.google.com
error No: 13
error Msg: Permission denied
HOST: alt2.gmail-smtp-in.l.google.com
error No: 13
error Msg: Permission denied
HOST: alt3.gmail-smtp-in.l.google.com
error No: 13
error Msg: Permission denied
HOST: alt4.gmail-smtp-in.l.google.com
error No: 13
error Msg: Permission denied
email <gremboloid@gmail.com> valid, but not exist!
2. On your server, ports for connection to an exterior network are closed.
example.php displays an error message:
HOST: gmail-smtp-in.l.google.com
error No: 61
error Msg: Connection refused
HOST: alt1.gmail-smtp-in.l.google.com
error No: 61
error Msg: Connection refused
HOST: alt2.gmail-smtp-in.l.google.com
error No: 61
error Msg: Connection refused
HOST: alt3.gmail-smtp-in.l.google.com
error No: 61
error Msg: Connection refused
HOST: alt4.gmail-smtp-in.l.google.com
error No: 61
error Msg: Connection refused
email <gremboloid@gmail.com>; valid, but not exist!
 Ehinarr Elkader - 2010-12-17 02:58:15 - In reply to message 1 from Konstantin Granin
I tested with several valid email addresses. All returned as valid, but non-existent.
- ehinarr@msn.com, vivifort@uol.com.br, flaviovidal@netscape.net,flaviusvitius@hotmail.com and others.
 Konstantin Granin - 2010-12-17 12:55:13 - In reply to message 2 from Ehinarr Elkader
Thanks, has corrected.
 johnymas - 2010-12-19 12:14:21 - In reply to message 3 from Konstantin Granin
I also tested with several valid email addresses. All returned as valid, but not exist!
email <info@johnymas.info> valid, but not exist!
info@johnymas.info
 Konstantin Granin - 2010-12-20 08:46:22 - In reply to message 4 from johnymas
Before call check(), use setEmailFrom('your@real.email')
 gaurav verma - 2012-05-16 13:11:31 - In reply to message 5 from Konstantin Granin
hello sir I am using your script but it's working on localhost not working on centos server....what can i do for this.
 Konstantin Granin - 2012-05-18 06:35:54 - In reply to message 6 from gaurav verma
Hi. Sorry so long in answering.
Usually when a problem does not work "fsockopen"
If you have the opportunity to include the output of error messages and delete the line "@" symbol:
if ($ fp = @ fsockopen ($ host, $ this-> _port, $ errno, $ errstr, $ timeout)) {
You should see an error message.
Have you checked your error logs?
|