AWS SES Missing final '@domain' PHP SDK

匿名 (未验证) 提交于 2019-12-03 01:00:01

问题:

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

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

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.

回答1:

Despite the name, this is an error indicating that SES doesn't like one of your parameters. In my case, I was basing my sendEmail request off this page from the PHP SDK documentation and I had left Source as 'string'.

Try setting up your message as $msg and using echo "sendSES msg: ".print_r($msg, true); to see exactly what's going to SES.

Postfix people seem to have the issue that the email address is not matching the ec2 domain name. A different issue, but similar in that it is SES rejecting the semantics of the data.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!