-
-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Labels
Description
Hello team,
I want to check if the email address exists or not, I have used the below script using proxy detail.
I have tried many proxies but not working and returning an error as "Error: Connection to tcp://alt3.aspmx.l.google.com:587 failed because proxy refused the connection with HTTP error code 403 (Forbidden) (ECONNREFUSED)", So could you plz suggest a proxy which supports to this.
require __DIR__ . '/../vendor/autoload.php';
$url = getenv('http_proxy');
if ($url === false) {
$url = '[ttmngjxo:2xiehi9i68nl@2.56.119.93:5074](mailto:ttmngjxo:2xiehi9i68nl@2.56.119.93:5074)';
}
$proxy = new Clue\React\HttpProxy\ProxyConnector($url);
$connector = new React\Socket\Connector(array(
'tcp' => $proxy,
'timeout' => 3.0,
'dns' => false
));
$connector->connect('tcp://alt3.aspmx.l.google.com:587')->then(function (React\Socket\ConnectionInterface $connection) {
$connection->write("EHLO local\r\n");
$connection->write("MAIL FROM:[test@gmail.com](mailto:test@gmail.com)\r\n");
$connection->write("RCPT TO:[skumbhar1@hghfhgfhgf.com](mailto:skumbhar1@hghfhgfhgf.com)\r\n");
$connection->write("RSET\r\n");
$connection->on('data', function ($chunk) use ($connection) {
echo $chunk."<br/><br/><br/>";
$connection->write("QUIT\r\n");
});
}, function (Exception $e) {
echo 'Error: ' . $e->getMessage() . PHP_EOL;
});