2017 © Pedro PelĂĄez
 

library smtp-validate-email

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

image

devmastersbv/smtp-validate-email

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

  • Friday, January 13, 2017
  • by DevMastersBV
  • Repository
  • 2 Watchers
  • 1 Stars
  • 187 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 109 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

SMTP_Validate_Email

Perform email address validation/verification via SMTP., (*1)

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., (*2)

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., (*3)

<?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);

The Versions

13/01 2017

dev-master

9999999-dev https://github.com/devmastersbv/smtp-validate-email

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

  Sources   Download

GPL-3.0

by Julian Rutten
by TomaĆĄ Trkulja [zytzagoo]
by Rob Dudley

email validation smtp

13/01 2017

0.0.4

0.0.4.0 https://github.com/devmastersbv/smtp-validate-email

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

  Sources   Download

GPL-3.0

by Julian Rutten
by TomaĆĄ Trkulja [zytzagoo]
by Rob Dudley

email validation smtp

13/01 2017

0.1

0.1.0.0 https://github.com/devmastersbv/smtp-validate-email

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

  Sources   Download

GPL-3.0

by Julian Rutten
by TomaĆĄ Trkulja [zytzagoo]
by Rob Dudley

email validation smtp

13/01 2017

0.0.3

0.0.3.0 https://github.com/devmastersbv/smtp-validate-email

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

  Sources   Download

GPL-3.0

by Julian Rutten
by TomaĆĄ Trkulja [zytzagoo]
by Rob Dudley

email validation smtp

04/08 2016

0.0.2

0.0.2.0 https://github.com/robdudley/smtp-validate-email

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

  Sources   Download

GPL-3.0

by TomaĆĄ Trkulja [zytzagoo]
by Rob Dudley

email validation smtp

04/08 2016

0.0.1

0.0.1.0 https://github.com/robdudley/smtp-validate-email

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

  Sources   Download

GPL-3.0

by TomaĆĄ Trkulja [zytzagoo]
by Rob Dudley

email validation smtp