/**
  * Send messages using SES.
  * @return void
  */
 public function isSES()
 {
     $this->Mailer = 'ses';
     $this->SESClient = awsautoses_sesclient();
 }
function awsautoses_verified($email)
{
    $key = "awsautoses_verified_{$email}";
    $verified = get_transient($key);
    if (!is_string($verified)) {
        $domain = preg_replace('/^.+?@/', '', $email);
        $identityVerifications = awsautoses_sesclient()->getIdentityVerificationAttributes(array('Identities' => array($email, $domain)));
        $va = $identityVerifications['VerificationAttributes'];
        if (isset($va[$email]) && $va[$email]['VerificationStatus'] === 'Success') {
            $verified = 'y';
        } elseif (isset($va[$domain]) && $va[$domain]['VerificationStatus'] === 'Success') {
            $verified = 'y';
        } else {
            $verified = 'n';
        }
        set_transient($key, $verified, WEEK_IN_SECONDS);
    }
    return $verified === 'y';
}