如何从Amazon SES检索响应?

Gan*_*abu 5 php amazon amazon-web-services amazon-ses

我有用于验证Amazon ses中的电子邮件地址的代码

<?php
$sesClient = SesClient::factory(array(
            'key'    => 'secret key',
            'secret' => 'secret',
            'profile' => 'user_name',
            'region'  => 'us-east-1'
        ));
$result = $sesClient->verifyEmailAddress(array('EmailAddress'=> $email));
?>
Run Code Online (Sandbox Code Playgroud)

$ result的输出是这样的:

object(Guzzle\Service\Resource\Model) {
    [protected] structure => null
    [protected] data => array()
}
Run Code Online (Sandbox Code Playgroud)

我实际上已经通过我指定的电子邮件ID验证了电子邮件.我的问题是,如何使用我收到的回复检查功能是否正常工作?在早期的亚马逊网络服务中,他们曾$result->is('Ok')用于验证结果.我现在应该使用什么功能来检查该功能成功与失败的结果?

我已经检查了亚马逊链接,仍然无法找到成功响应的功能

use*_*647 2

查看 aws-sdk-php 的测试发现:

https://github.com/aws/aws-sdk-php/blob/master/tests/Aws/Tests/Ses/Integration/IntegrationTest.php#L86

也许你可以尝试:

$sesClient->verifyEmailAddress(array('EmailAddress'=> $email));
$sesClient->waitUntilIdentityExists(array('Identities' => array($email)));
$result = $sesClient->getIdentityVerificationAttributes(array('Identities' => array($email)));
if ('Success' === $result->getPath("VerificationAttributes/{$email}/VerificationStatus"))
Run Code Online (Sandbox Code Playgroud)