Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.x] Fix SesV2Transport to use correct EmailTags argument #51265

Merged
merged 1 commit into from
May 2, 2024

Conversation

Tietew
Copy link
Contributor

@Tietew Tietew commented May 2, 2024

Illuminate\Mail\Transport\SesV2Transport calls SESv2's SendEmail API but passes v1's Tags argument. The call doesn't fail but the tags are not attached to the sent email.
(ConfigurationSet events don't include specified tags)

This PR fixes the parameter name to correct EmailTags.

Notes:

  • Please don't confuse that SesTransport uses SES v1, which argument name is Tags.
  • Laravel 10.x has same issue. Backport will be needed.

Reference:

Steps:

class TestMail extends Mailable
{
    public function envelope(): Envelope
    {
        return new Envelope(subject: 'blah blah blah', metadata: ['Foo' => 'Bar']);
    }
}

The ConfigurationSet event Before:

{
    "eventType": "Delivery",
    "mail": {
        ...
        "tags": {
            "ses:operation": ["SendRawEmail"],
            ...
        }
    }, ...
}

After:

{
    "eventType": "Delivery",
    "mail": {
        ...
        "tags": {
            "ses:operation": ["SendRawEmail"],
            ...
            "Foo": ["Bar"] // <- HERE
        }
    }, ...
}

Related PR: #42390

@taylorotwell taylorotwell merged commit 4dcd347 into laravel:11.x May 2, 2024
30 checks passed
func0der pushed a commit to func0der/framework that referenced this pull request May 6, 2024
@Tietew Tietew deleted the ses-transport-tags-argument branch May 9, 2024 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants