I try to send mail via Laravel with amazon SES from custom sender addresses. When I try to send it, I have this error:
exception 'Aws\Ses\Exception\SesException' with message 'Error executing "SendRawEmail" on "https://email.us-east-1.amazonaws.com"; AWS HTTP error: Client error:
POST https://email.us-east-1.amazonaws.com
resulted in a400 Bad Request
response:<ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/"> <Error> <Type>Sender</Type> <Code>MessageReje (truncated...) MessageRejected (client): Email address is not verified. The following identities failed the check in region US-EAST-1: =?utf-8?Q?Rapha=C3=ABl?= XXXXX <XXXXX@XXXXX.com>, XXXXX@XXXXX.com - <ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/"> <Error> <Type>Sender</Type> <Code>MessageRejected</Code> <Message>Email address is not verified. The following identities failed the check in region US-EAST-1: =?utf-8?Q?Rapha=C3=ABl?= XXXXX <raphaelht@gmail.com>, XXXXX@XXXXX.com</Message> </Error> <RequestId>ee2403e6-07d7-11e7-83bf-69ca6c084a61 </ErrorResponse>
So it seems my sender mail address is not accepted. In other hand, one application built with Zend Framework (I did not built it) with the same Amazon account works for same sender address.
I think there is something to do to accept "random" sender addresses (it works for the Zend one). In the configuration of the Zend application, there is one more information for SES:
'arn' => array(
'emails' => 'arn:aws:sns:us-east-1:xxxxxxxxx:Emails'
),
Is this this line which make it work? How can I do the same thing with Laravel?