dongxixiu9134 2014-02-04 11:38
浏览 44

使用php在实时站点上不使用SMTP_validateEmail

hey My code is working fine on my local server but not working on live site. I used class SMTP_validateEmail.class.php file to implement the email validation. Please help me as soon as possible. What we need to do to execute this.

For invalid email it is working fine but for correct email it is not working fine.

============for smtp_validateEmail.class.php=====

https://code.google.com/p/php-smtp-email-validation/

//===check_mail.php===

<?php

/**
 * Example 1
 * Validate a single Email via SMTP
 */


// include SMTP Email Validation Class

require_once('smtp_validateEmail.class.php');

// the email to validate

$email = $_POST['name'];
// an optional sender

$sender = $_POST['name'];
// instantiate the class

$SMTP_Validator = new SMTP_validateEmail();
// turn on debugging if you want to view the SMTP transaction

//$SMTP_Validator->debug = true;
// do the validation

$results = $SMTP_Validator->validate(array($email), $sender);


// send email?

if ($results[$email]) {
 echo 1; 
} else {
  echo 0; 
}


?>
  • 写回答

1条回答 默认 最新

  • dongmei1828 2015-02-06 14:01
    关注

    I faced same issue but I tried to change the $nameserver array values in SMTP_validateEmail.class.php to my web hosting sever's IP address and now it is working fine.

    If your server has any other port number for SMTP like Google then replace the existing port number with it.

    Hope it will work for you too.

    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分