AWS SES Missing Final "@domain" PHP SDK

Here's a tidbit, so you don’t have to spend two hours almost tearing your hair out, as I did.

The following error message appeared: Fatal error: Uncaught Aws \ Ses \ Exception \ SesException: AWS Error code: InvalidParameterValue, status code: 400, AWS Request ID: [Deleted 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 showed that validation is being performed (for example, ToAddresses should be an array), so I assumed that the data was verified. To some extent, I was wrong.

+2
source share
1 answer

Despite the name, this is an error indicating that SES does not like one of your options. In my case, I based the sendEmail request on this page from the PHP SDK documentation , and I left Source as 'string'.

Try customizing your message as $msgand using echo "sendSES msg: ".print_r($msg, true);it to see exactly what will happen to SES.

Postfix users seem to have a problem that the email address does not match the ec2 domain name. Another problem, but it looks like SES rejects data semantics.

+3
source

Source: https://habr.com/ru/post/1523311/


All Articles