You are here

public function EmailValidatorPhpMailerDefault::isValid in SMTP Authentication Support 8

This function validates in same way the PHPMailer class does in its default behavior.

Overrides EmailValidatorInterface::isValid

File

tests/src/Unit/Plugin/Mail/SMTPMailSystemTest.php, line 321

Class

EmailValidatorPhpMailerDefault
An adaptor class wrapping the default PHPMailer validator.

Namespace

Drupal\Tests\smtp\Unit\Plugin\Mail

Code

public function isValid($email) {
  PHPMailer::$validator = 'php';
  return PHPMailer::validateAddress($email);
}