You are here

private function AmazonSes::verifyDomainIdentity in Amazon SES 7.2

Call Query API action VerifyDomaindentity.

Verifies a domain.This action is throttled at one request per second.

1 call to AmazonSes::verifyDomainIdentity()
AmazonSes::performServiceAction in src/AmazonSes.php
Add required parameter & header to the Query according to Query action.

File

src/AmazonSes.php, line 369
Class for interacting with Amazon SES service.

Class

AmazonSes
Modify the drupal mail system to use Amazon SES.

Namespace

Drupal\amazon_ses

Code

private function verifyDomainIdentity($action_parameter) {
  $result['error'] = FALSE;
  try {
    $response = $this->sesClient
      ->verifyDomainIdentity([
      'Domain' => $action_parameter['Domain'],
    ]);
    $result['token'] = $response['VerificationToken'];
  } catch (\Aws\Ses\Exception\SesException $e) {
    $result['message'] = $e
      ->getAwsErrorType();
    $result['errorCode'] = $e
      ->getAwsErrorCode();
    $result['error'] = TRUE;
  } catch (\Aws\Ses\Exception\SesException $e) {
    $result['message'] = $e
      ->getAwsErrorType();
    $result['errorCode'] = $e
      ->getAwsErrorCode();
    $result['error'] = TRUE;
  }
  return $result;
}