如何从Amazon SES检索响应? [英] How to retrieve response from Amazon SES?
问题描述
我有用于验证Amazon ses中电子邮件地址的代码
I have the code to verify email address in 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));
?>
我的$ result输出如下:
My output for $result is like this:
object(Guzzle\Service\Resource\Model) {
[protected] structure => null
[protected] data => array()
}
我实际上在指定的电子邮件ID中收到了经过验证的电子邮件。我的问题是,如何使用收到的响应检查功能是否正常工作?在早期的Amazon Web服务中,他们使用 $ result-> is('Ok')
来验证结果。我现在应该使用哪个功能来检查该功能的成功和失败结果?
我已经使用 amazon链接进行了检查仍然找不到成功响应的函数
I actually got verified email in the email id I have specified. My question is, how to check whether the function worked correctly using the response I have received? In earlier Amazon web services, they used $result->is('Ok')
to verify the result. what function should I use now to check the result for success and failure of that function?
I've checked with the amazon link and still can't find the function for successful response
推荐答案
看着aws-sdk-php的测试发现了这一点:
Looking at tests of aws-sdk-php found this:
也许您可以尝试:
$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"))
这篇关于如何从Amazon SES检索响应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!