【发布时间】:2014-07-12 21:09:21
【问题描述】:
我有验证 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 输出是这样的:
object(Guzzle\Service\Resource\Model) {
[protected] structure => null
[protected] data => array()
}
我实际上在我指定的电子邮件 ID 中收到了经过验证的电子邮件。我的问题是,如何使用我收到的回复检查该功能是否正常工作?在早期的亚马逊网络服务中,他们使用$result->is('Ok') 来验证结果。我现在应该使用什么函数来检查该函数的成功和失败结果?
我已经检查了amazon link,但仍然找不到成功响应的功能
【问题讨论】:
-
问题:如果您尝试验证电子邮件地址
lolcat@example又名无效的电子邮件地址会怎样?你得到什么回应? -
@Michael 我收到了这个回复
object(Guzzle\Service\Resource\Model) { [protected] structure => null [protected] data => array() } -
如果您使用有效的电子邮件地址,您会收到不同的回复吗?
-
所以,似乎 data->ResponseMetaData->RequestId 将在成功时设置而在错误时丢失...
-
@RobertHarvey 对于每个电子邮件地址的问题,无论其有效性如何,我都会得到相同的回复
标签: php amazon-web-services amazon amazon-ses