/** * Return the DNS records for the DKIM settings * * @return array */ public function fetchDkimRecords() { $result = $this->sesClient->getIdentityDkimAttributes(['Identities' => [$this->identity->getIdentity()]]); $records = []; $results = $result->search("DkimAttributes.*.DkimTokens"); if (is_array($results)) { foreach (current($results) as $result) { $name = $result . "._domainkey." . $this->identity->getDomain(); $value = $result . ".dkim.amazonses.com"; $records[] = new Dns("CNAME", $name, $value); } } return $records; }