Skip to content

[Webhook][RemoteEvent] Sendgrid webhook only parses the first event #53727

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
SherinBloemendaal opened this issue Feb 1, 2024 · 3 comments
Closed

Comments

@SherinBloemendaal
Copy link
Contributor

Symfony version(s) affected

6.4.2

Description

Currently, the implementation of handling SendGrid webhooks processes only the first event. However, SendGrid webhooks often contain multiple batched events (Reference) causing to miss events in the current implementation. The SendgridRequestParser.php#L44 expects a single AbstractMailerEvent to be returned so i think this one is hard to fix without breaking the current implementation.

How to reproduce

  1. Implement the Sendgrid webhook & mailer by following the Symfony Docs.
  2. Send an e-mail to a non-existing recipient address, causing a direct defer. The webhook will contain a processed event and a deferred event.
  3. Only the first event is being parsed. (Ref to code)

Possible Solution

No response

Additional Context

No response

@carsonbot
Copy link

Hey, thanks for your report!
There has not been a lot of activity here for a while. Is this bug still relevant? Have you managed to find a workaround?

@SherinBloemendaal
Copy link
Contributor Author

Still relevant. I can provide a pull request soon.

@carsonbot carsonbot removed the Stalled label Aug 5, 2024
@ericabouaf
Copy link
Contributor

This was resolved in 7.2 by this PR #58401

@fabpot fabpot closed this as completed Jan 6, 2025
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