You are here

class EmailValidatorPhpMailerDefault in SMTP Authentication Support 8

An adaptor class wrapping the default PHPMailer validator.

Hierarchy

Expanded class hierarchy of EmailValidatorPhpMailerDefault

File

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

Namespace

Drupal\Tests\smtp\Unit\Plugin\Mail
View source
class EmailValidatorPhpMailerDefault implements EmailValidatorInterface {

  /**
   * {@inheritdoc}
   *
   * This function validates in same way the PHPMailer class does in its
   * default behavior.
   */
  public function isValid($email) {
    PHPMailer::$validator = 'php';
    return PHPMailer::validateAddress($email);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EmailValidatorPhpMailerDefault::isValid public function This function validates in same way the PHPMailer class does in its default behavior. Overrides EmailValidatorInterface::isValid