承接 devmastersbv/smtp-validate-email 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

devmastersbv/smtp-validate-email

Composer 安装命令:

composer require devmastersbv/smtp-validate-email

包简介

Validates an email address by checking for MX records and performing and SMTP triplet connection

README 文档

README

Perform email address validation/verification via SMTP.

The class retrieves MX records for the email domain and then connects to the domain's SMTP server to try figuring out if the address really exists.

Some features (see the source for more)

  • Not really sending a message, gracefully resetting the session when done
  • Command-specific communication timeouts implemented per relevant RFCs
  • Catch-all account detection
  • Batch mode processing supported
  • MX query support on Windows without requiring any PEAR packages
  • Logging and debugging support

Basic example

<?php

use SMTPValidateEmail\SMTPValidateEmail;

$from = 'sendingemail@test.test';
$email = 'emailtoverify@test.test';

$validator = new SMTPValidateEmail($email, $from);
$smtp_results = $validator->validate();

print_r($smtp_results);

Array usage

The class supports passing an array of addresses in the constructor or to the validate() method. Checking multiple addresses on the same server uses a single connection.

<?php

use SMTPValidateEmail\SMTPValidateEmail;

$from = 'a-happy-camper@campspot.net'; // for SMTP FROM:<> command
$emails = array(
    'someone@somewhere.net',
    'some-other@somewhere-else.net',
    'someone@example.com',
    'someone-else@example.com'
);

$validator = new SMTPValidateEmail($emails, $from);
$smtp_results = $validator->validate();

// or passing to the validate() method
// $validator = new SMTPValidateEmail();
// $smtp_results = $validator->validate($emails, $from);

print_r($smtp_results);

统计信息

  • 总下载量: 946
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 153
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2017-01-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固