gpt4 book ai didi

php - 如何从 Amazon SES 检索响应?

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:38:32 25 4
gpt4 key购买 nike

我有在 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还是找不到成功响应的函数

最佳答案

我相信你需要使用 verifyEmailIdentity 不是 verifyEmailAddress:

$result = $sesClient->verifyEmailIdentity(array('EmailAddress'=> $email));

如 AWS 文档中所述:

The VerifyEmailAddress action is deprecated as of the May 15, 2012 release of Domain Verification. The VerifyEmailIdentity action is now preferred.

Further Reading

关于php - 如何从 Amazon SES 检索响应?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23830383/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com