AWS SES缺少最终的'@domain'PHP SDK [英] AWS SES Missing final '@domain' PHP SDK

查看:283
本文介绍了AWS SES缺少最终的'@domain'PHP SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是个花招,所以您不必像我刚才那样花两个小时就几乎要扯掉头发.

Here's a tidbit so you don't have to spend two hours nearly tearing out your hair like I just did.

我收到以下错误消息: 致命错误:未捕获的Aws \ Ses \ Exception \ SesException:AWS错误代码:InvalidParameterValue,状态代码:400,AWS请求ID:[已为堆栈溢出而移除],AWS错误类型:客户端,AWS错误消息:缺少最终的'@domain',用户代理:aws-sdk-php2/2.6.6食人鱼/3.9.1 curl/7.36.0 PHP/5.5.12

I was receiving the following error message: Fatal error: Uncaught Aws\Ses\Exception\SesException: AWS Error Code: InvalidParameterValue, Status Code: 400, AWS Request ID: [Removed for stackoverflow], AWS Error Type: client, AWS Error Message: Missing final '@domain', User-Agent: aws-sdk-php2/2.6.6 Guzzle/3.9.1 curl/7.36.0 PHP/5.5.12

较早的错误表明发生了验证(例如ToAddresses必须是一个数组),因此我假设数据已验证.在一定程度上,我错了.

Earlier errors had shown validation taking place, (e.g. ToAddresses must be an array), so I assumed the data was validated. To a degree, I was wrong.

推荐答案

尽管有名称,这是一个错误,指示SES不喜欢您的参数之一.就我而言,我在

Despite the name, this is an error indicating that SES doesn't like one of your parameters. In my case, I had used the code on this page from the PHP SDK documentation to build up the parameter for sendEmail() and I had left Source as 'string'.

尝试将sendEmail()的参数构建为$msg,并使用echo "sendSES msg: ".print_r($msg, true);来准确了解将要进行SES的情况.

Try building your parameter for sendEmail() as $msg and using echo "sendSES msg: ".print_r($msg, true); to see exactly what's going to SES.

Postfix用户可能会遇到电子邮件地址与ec2域名不匹配的问题.这是一个不同的问题,但相似之处在于SES拒绝了数据的语义.

Postfix users may have the issue that the email address is not matching the ec2 domain name. It is a different issue, but similar in that it is SES rejecting the semantics of the data.

这篇关于AWS SES缺少最终的'@domain'PHP SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆