存在我看到的关于如何检查电子邮件是否存在或不是,我不太明白如何计算器一些教程...检查电子邮件与TELNET和PHP
方法1
基本上,我不得不在CMD.EXE运行以下命令
telnet gmail-smtp-in.l.google.com 25
helo
mail from: <[email protected]>
rcpt to: <[email protected]>
如果响应是“OK”,那么我们有一个良好的电子邮件。我插了这一切在.BAT文件,什么bat文件确实只是连接到远程登录和结束......
方法2
使用这种 http://www.geckotribe.com/php-telnet/#usage连接到远程登录,但我不知道我应该提供什么样的密码
<?php
require_once "PHPTelnet.php";
$telnet = new PHPTelnet();
// if the first argument to Connect is blank,
// PHPTelnet will connect to the local host via 127.0.0.1
$result = $telnet->Connect('mail.gmail.com','usr','password');
if ($result == 0)
{
$telnet->DoCommand('helo', $result);
// NOTE: $result may contain newlines
echo $result;
$telnet->DoCommand('another command', $result);
echo $result;
// say Disconnect(0); to break the connection without explicitly logging out
$telnet->Disconnect();
}
?>
你们可以帮助我吗?
我怀疑这只适用于检查* gmail *帐户是否存在... – meagar 2012-02-02 21:35:25
你想检查它是否存在?你想知道一个特定的电子邮件地址是否有效吗?或者要知道您是否可以通过特定账户发送?或者是其他东西?无论哪种方式,我怀疑你的两种方法中的任何一种都适用于Gmail,我敢肯定他们需要TLS for SMTP ... – DaveRandom 2012-02-02 21:38:40
我必须知道,如果一些用户提供给我一个真实的电子邮件地址,而不是像fake243241addres423432243 @ yahoo .com女巫从正则的角度来看是好的,但... – Master345 2012-02-02 21:48:36