catch (HttpException
$e) { $exception =
new HttpTransportException(sprintf('Unable to send an email: %s (code %s).',
$e->
getAwsMessage() ?:
$e->
getMessage(),
$e->
getAwsCode() ?:
$e->
getCode()),
$e->
getResponse(),
$e->
getCode(),
$e);
$exception->
appendDebug($e->
getResponse()->
getInfo('debug'
) ?? ''
);
throw $exception;
} } protected function getRequest(SentMessage
$message): SendEmailRequest
{ $request =
[ 'Destination' =>
new Destination([ 'ToAddresses' =>
$this->
stringifyAddresses($message->
getEnvelope()->
getRecipients()),
]),
'Content' =>
[ 'Raw' =>
[ 'Data' =>
$message->
toString(),
],
],
];
if (($message->
getOriginalMessage() instanceof Message
) &&
$configurationSetHeader =
$message->
getOriginalMessage()->
getHeaders()->
get('X-SES-CONFIGURATION-SET'
)) {