3
votes

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

1 Answers

4
votes

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'.

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 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.