You are here

private function AmazonSesClass::verifyDomainDkim in Amazon SES 7

Call Query API action VerifyDomainDkim.

This action is throttled at one request per second. DKIM tokens are character strings that represent your domain's identity. Using these tokens you will need to create DNS CNAME records that point to DKIM public keys hosted by Amazon SES.

1 call to AmazonSesClass::verifyDomainDkim()
AmazonSesClass::performServiceAction in includes/classes/amazonses.class.php
Add required parameter & header to the Query according to Query action.

File

includes/classes/amazonses.class.php, line 308
Class for interacting with Amazon SES service.

Class

AmazonSesClass
Modify the drupal mail system to use Amazon SES.

Code

private function verifyDomainDkim($action_parameter, $request, $action_response = '', $response_code = '0') {
  if ($request) {
    $this
      ->setRequestParameter('Action', 'VerifyDomainDkim');
    if (isset($action_parameter['Domain'])) {
      $this
        ->setRequestParameter('Domain', $action_parameter['Domain']);
    }
  }
  else {
    $result = array();
    if ($response_code == '200') {
      $result['status'] = AMAZON_SES_REQUEST_SUCCESS;
      $dkim_tokens = $action_response->DkimTokens;
      foreach ($dkim_tokens as $member) {
        $result[]['member'] = (string) $member;
      }
      return $result;
    }
    else {
      $result['Type'] = $action_response->Type;
      $result['Code'] = $action_response->Code;
      $result['Message'] = $action_response->Message;
      $result['status'] = AMAZON_SES_REQUEST_FALIURE;
      return $result;
    }
  }
}