get_identity_dkim_attributes ( $identities, $opt )

Returns the DNS records, or tokens, that must be present in order for Easy DKIM to sign outgoing email messages.

This action takes a list of verified identities as input. It then returns the following information for each identity:

  • Whether Easy DKIM signing is enabled or disabled.
  • The set of tokens that are required for Easy DKIM signing. These tokens must be published in the domain name’s DNS records in order for DKIM verification to complete, and must remain published in order for Easy DKIM signing to operate correctly. (This information is only returned for domain name identities, not for email addresses.)
  • Whether Amazon SES has successfully verified the DKIM tokens published in the domain name’s DNS. (This information is only returned for domain name identities, not for email addresses.)

For more information about Easy DKIM signing, go to the Amazon SES Developer Guide.

Access

public

Parameters

Parameter

Type

Required

Description

$identities

string
array

Required

A list of one or more verified identities - email addresses, domains, or both. Pass a string for a single value, or an indexed array for multiple values.

$opt

array

Optional

An associative array of parameters that can have the following keys:

  • curlopts - array - Optional - A set of values to pass directly into curl_setopt(), where the key is a pre-defined CURLOPT_* constant.
  • returnCurlHandle - boolean - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.

Returns

Type

Description

CFResponse

A CFResponse object containing a parsed HTTP response.

Examples

Testing the DKIM signing feature of SES.

// Instantiate the class
$email = new AmazonSES();

$response = $email->get_identity_dkim_attributes('example.com');

var_dump($response->isOK());

$response = $email->verify_domain_dkim('example.com');

var_dump($response->isOK());

$response = $email->set_identity_dkim_enabled('example.com', true);
$message = (string) $response->body->Error->Message;

var_dump($message);
Result:
bool(true)
bool(true)
string(39) "Identity amazonaws.com is not verified."

Source

Method defined in services/ses.class.php | Toggle source view (11 lines) | View on GitHub

public function get_identity_dkim_attributes($identities, $opt = null)
{
    if (!$opt) $opt = array();
            
    // Required list (non-map)
    $opt = array_merge($opt, CFComplexType::map(array(
        'Identities' => (is_array($identities) ? $identities : array($identities))
    ), 'member'));

    return $this->authenticate('GetIdentityDkimAttributes', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback