$this->
assertSame('aws-configuration-set-name',
$body['ConfigurationSetName'
]);
$this->
assertSame('aws-source-arn',
$body['FromEmailAddressIdentityArn'
]);
$this->
assertSame([['Name' => 'tagName1', 'Value' => 'tag Value1'
],
['Name' => 'tagName2', 'Value' => 'tag Value2'
]],
$body['EmailTags'
]);
$json = '{"MessageId": "foobar"}';
return new MockResponse($json,
[ 'http_code' => 200,
]);
});
$transport =
new SesHttpAsyncAwsTransport(new SesClient(Configuration::
create([]),
new NullProvider(),
$client));
$mail =
new Email();
$mail->
subject('Hello!'
) ->
to(new Address('saif.gmati@symfony.com', 'Saif Eddin'
)) ->
from(new Address('fabpot@symfony.com', 'Fabien'
)) ->
text('Hello There!'
);
$mail->
getHeaders()->
addTextHeader('X-SES-CONFIGURATION-SET', 'aws-configuration-set-name'
);
$mail->
getHeaders()->
addTextHeader('X-SES-SOURCE-ARN', 'aws-source-arn'
);
$mail->
getHeaders()->
add(new MetadataHeader('tagName1', 'tag Value1'
));
$mail->
getHeaders()->
add(new MetadataHeader('tagName2', 'tag Value2'
));