You are here

private function AmazonSesClass::getSendQuota in Amazon SES 7

Call Query API action GetSendQuota.

This action is throttled at one request per second.

1 call to AmazonSesClass::getSendQuota()
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 234
Class for interacting with Amazon SES service.

Class

AmazonSesClass
Modify the drupal mail system to use Amazon SES.

Code

private function getSendQuota($action_parameter) {
  $response_xml = $this->sesClient
    ->get_send_quota($action_parameter);

  // Parse the xml response.
  $response = $response_xml->body
    ->to_stdClass();
  if ($response_xml->status == '200') {
    $result['status'] = AMAZON_SES_REQUEST_SUCCESS;
    $result['SentLast24Hours'] = check_plain($response->GetSendQuotaResult->SentLast24Hours);
    $result['Max24HourSend'] = check_plain($response->GetSendQuotaResult->Max24HourSend);
    $result['MaxSendRate'] = check_plain($response->GetSendQuotaResult->MaxSendRate);
  }
  else {
    $result['status'] = AMAZON_SES_REQUEST_FALIURE;
  }
  return $result;
}