定制 ddtraceweb/smtp-validator-email 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ddtraceweb/smtp-validator-email

最新稳定版本:2.3.0

Composer 安装命令:

composer require ddtraceweb/smtp-validator-email

包简介

Validate your email by smtp protocol

README 文档

README

#Smtp Validator Emails Build Status

  • Smtp Validator mail can validate your email to send smtp mail and check your mx.

#Requirements

  • PHP >= 5.4
  • namespaces use
  • smtp configuration PHP Ok.

#Installation For installation you can use composer.

Simple add "ddtraceweb/smtp-validator-email": "dev-master" in your composer.json to install the latest version

#examples :

  • example with 1 email :
<?php use SmtpValidatorEmail\ValidatorEmail; $from = 'xyz@xzzz.com'; // for SMTP FROM:<> command $emails = 'toto@somewhererlse.com'; $validator = new ValidatorEmail($email, $from); var_dump($validator->getResults()); ?>
  • example with X emails :
<?php use SmtpValidatorEmail\ValidatorEmail; $from = 'xyz@xzzz.com'; // for SMTP FROM:<> command $emails = array('toto@somewhererlse.com', 'titi@totitito.com'); $validator = new ValidatorEmail($email, $from); var_dump($validator->getResults()); ?>
  • example with X emails and have custom delays time when connection and send HELO, with domain need time to respond.
<?php use SmtpValidatorEmail\ValidatorEmail; $from = 'xyz@xzzz.com'; // for SMTP FROM:<> command $emails = array('toto@somewhererlse.com', 'titi@totitito.com'); //two loops in this example for difficult domains. $options = array('delaySleep' => array(0, 6)); //Handle $options to the constructor as third parameter $validator = new ValidatorEmail($email, $from, $options); var_dump($validator->getResults()); ?>
  • example with X emails with more informations on domain, mxs and priorities.
<?php use SmtpValidatorEmail\ValidatorEmail; $from = 'xyz@xzzz.com'; // for SMTP FROM:<> command $emails = array('toto@somewhererlse.com', 'titi@totitito.com'); //more informations option activate $options = array('domainMoreInfo' => true); //Handle $options to the constructor as third parameter $validator = new ValidatorEmail($email, $from, $options); var_dump($validator->getResults()); ?>
  • example with X emails with more informations on domain, mxs and priorities. In example same domain for two email. This is a connection to domain and check all account emails.
<?php use SmtpValidatorEmail\ValidatorEmail; $from = 'xyz@xzzz.com'; // for SMTP FROM:<> command $emails = array('toto@somewhererlse.com', 'titi@somewhererlse.com'); //more informations option activate $options = array('domainMoreInfo' => true); //Handle $options to the constructor as third parameter $validator = new ValidatorEmail($email, $from, $options); var_dump($validator->getResults()); ?>
  • example with 1 email with using a specific interface with debug mode ON:
<?php use SmtpValidatorEmail\ValidatorEmail; $from = 'xyz@xzzz.com'; // for SMTP FROM:<> command $emails = 'toto@somewhererlse.com'; $validator = new ValidatorEmail($email, $from, array('debug' => true, 'context' => 'socket' => array('bindto' => '0.0.0.0'))); var_dump($validator->getResults()); var_dump($validator->getDebug()); ?>
  • Available default options
array( 'domainMoreInfo' => false, 'delaySleep' => array(0), 'noCommIsValid' => 0, 'catchAllIsValid' => 0, 'catchAllEnabled' => 1, 'timeout' => null, // ini_get("default_socket_timeout") 'context' => array(), 'detailResults' => false, // Instead of returning 0 for invalid and 1 for valid, it will return an array. array('result' => $isValid /* 0 or 1 */, 'info' => "<SMTP response like: 250 2.1.5 Ok>") 'debug' => false );

统计信息

  • 总下载量: 140.67k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 31
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 28
  • Watchers: 6
  • Forks: 18
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固