You are here

public function AmazonSesHandler::verifyIdentity in Amazon SES 2.0.x

Verify an identity.

Parameters

string $identity: The identity to verify.

string $type: The type of the identity, domain or email.

Overrides AmazonSesHandlerInterface::verifyIdentity

File

src/AmazonSesHandler.php, line 252

Class

AmazonSesHandler
Amazon SES service.

Namespace

Drupal\amazon_ses

Code

public function verifyIdentity($identity, $type) {
  switch ($type) {
    case 'domain':
      $this->client
        ->verifyDomainIdentity([
        'Domain' => $identity,
      ]);
      break;
    case 'email':
      $this->client
        ->verifyEmailIdentity([
        'EmailAddress' => $identity,
      ]);
      break;
  }
}