8000 [Mailer][BrevoMailer] BrevoRequestParser handles tags as mandatory parameter · Issue #54088 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Mailer][BrevoMailer] BrevoRequestParser handles tags as mandatory parameter #54088

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

Closed
palgalik opened this issue Feb 27, 2024 · 2 comments
Closed

Comments

@palgalik
Copy link
Contributor
palgalik commented Feb 27, 2024

Symfony version(s) affected

7.0.3

Description

BrevoRequesstParser handles 'tags' as a mandatory parameter, when it's not.
https://github.com/symfony/brevo-mailer/blob/7.0/Webhook/BrevoRequestParser.php#L52C1-L53C1

Brevo's documentation doesn't clarify, but 'tags' aren't mandatory parts of the request.

https://developers.brevo.com/docs/transactional-webhooks#sent

How to reproduce

  • setup webhook url in your Brevo settings
  • click on "test" button
  • the webhook API will reject all test requests with 406 (it's fails on the part !isset($content['tags']))

Screenshot 2024-02-27 at 17 07 48
Screenshot 2024-02-27 at 17 09 23

Also if you send any emails without adding some TagHeader to the email, all related webhook event will be rejected for the same reason.

Possible Solution

Remove !isset($content['tags']) condition from doParse method in Symfony\Component\Mailer\Bridge\Brevo\Webhook\BrevoRequestParser

Additional Context

No response

@stof
Copy link
Member
stof commented Feb 27, 2024

Can you send a PR with a fix ? Those mailer bridges are maintained based on community contributions.

@palgalik
Copy link
Contributor Author

Sure. @stof. I did create a PR. Do you have any idea why CI pipeline fails?

@fabpot fabpot closed this as completed Feb 28, 2024
fabpot added a commit that referenced this issue Feb 28, 2024
…s (palgalik)

This PR was merged into the 6.4 branch.

Discussion
----------

[Mailer] [Brevo] Remove tags from mandatory event arguments

'tags' in not mandatory part of an event
therefore it got removed from the validation process

| Q             | A
| ------------- | ---
| Branch?       |  6.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | Fix [54088](#54088)
| License       | MIT

Commits
-------

dfb41cd [Mailer][Brevo] Remove tags from mandatory event arguments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
0