Skip to content

Commit

Permalink
fix: incorrect parameter name in SesV2Transport (laravel#51265)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tietew authored and func0der committed May 6, 2024
1 parent 4228a4b commit 558a06b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Mail/Transport/SesV2Transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected function doSend(SentMessage $message): void

foreach ($message->getOriginalMessage()->getHeaders()->all() as $header) {
if ($header instanceof MetadataHeader) {
$options['Tags'][] = ['Name' => $header->getKey(), 'Value' => $header->getValue()];
$options['EmailTags'][] = ['Name' => $header->getKey(), 'Value' => $header->getValue()];
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Mail/MailSesV2TransportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function testSend()
return $arg['Source'] === 'myself@example.com' &&
$arg['Destination']['ToAddresses'] === ['me@example.com', 'you@example.com'] &&
$arg['ListManagementOptions'] === ['ContactListName' => 'TestList', 'TopicName' => 'TestTopic'] &&
$arg['Tags'] === [['Name' => 'FooTag', 'Value' => 'TagValue']] &&
$arg['EmailTags'] === [['Name' => 'FooTag', 'Value' => 'TagValue']] &&
strpos($arg['Content']['Raw']['Data'], 'Reply-To: Taylor Otwell <taylor@example.com>') !== false;
}))
->andReturn($sesResult);
Expand Down Expand Up @@ -113,7 +113,7 @@ public function testSesV2LocalConfiguration()
'region' => 'eu-west-1',
'options' => [
'ConfigurationSetName' => 'Laravel',
'Tags' => [
'EmailTags' => [
['Name' => 'Laravel', 'Value' => 'Framework'],
],
],
Expand Down Expand Up @@ -146,7 +146,7 @@ public function testSesV2LocalConfiguration()

$this->assertSame([
'ConfigurationSetName' => 'Laravel',
'Tags' => [
'EmailTags' => [
['Name' => 'Laravel', 'Value' => 'Framework'],
],
], $transport->getOptions());
Expand Down

0 comments on commit 558a06b

Please sign in to comment.