You are here

function amazon_ses_verified_addresses in Amazon SES 6

2 calls to amazon_ses_verified_addresses()
amazon_ses_admin_info in ./amazon_ses.admin.inc
amazon_ses_admin_settings in ./amazon_ses.admin.inc
Administrative settings.

File

./amazon_ses.admin.inc, line 231
Administrative forms for Amazon SES module.

Code

function amazon_ses_verified_addresses() {
  $amazon_ses = new AmazonSES();
  $verified_addresses = $amazon_ses
    ->list_verified_email_addresses();
  if ($verified_addresses
    ->isOK()) {
    $items = array();
    foreach ($verified_addresses->body->ListVerifiedEmailAddressesResult->VerifiedEmailAddresses->member as $address) {
      $mail = (string) $address;
      $items[$mail] = $mail;
    }
    return $items;
  }
  else {
    drupal_set_message(t('Amazon SES request failed. Please verify <a href="!config">Amazon AWS configuration</a>.', array(
      '!config' => url('admin/settings/creeper', array(
        'query' => drupal_get_destination(),
      )),
    )));
    return array();
  }
}