verify_domain_dkim ( $domain, $opt )

Returns a set of DNS records, or tokens, that must be published in the domain name’s DNS to complete the DKIM verification process. These tokens are DNS CNAME records that point to DKIM public keys hosted by Amazon SES. To complete the DKIM verification process, these tokens must be published in the domain’s DNS. The tokens must remain published in order for Easy DKIM signing to function correctly.

After the tokens are added to the domain’s DNS, Amazon SES will be able to DKIM-sign email originating from that domain. To enable or disable Easy DKIM signing for a domain, use the SetIdentityDkimEnabled action.

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

Access

public

Parameters

Parameter

Type

Required

Description

$domain

string

Required

The name of the domain to be verified for Easy DKIM signing.

$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 (7 lines) | View on GitHub

public function verify_domain_dkim($domain, $opt = null)
{
    if (!$opt) $opt = array();
    $opt['Domain'] = $domain;
    
    return $this->authenticate('VerifyDomainDkim', $opt);
}

Copyright © 2010–2013 Amazon Web Services, LLC


Feedback