Closed
Description
Symfony version(s) affected: 5.3
Description
Sending e-mails via de Sendgrid mailer API transport stopped working after the latest update, I have done some digging in the commits and it seems like the following commit: symfony/sendgrid-mailer@e6f0e43 breaks sending emails.
The sendgrid API does not return a response body when sending the email has been successful, see documentation here. This causes an exception when decoding the response.
How to reproduce
Setup the sendgrid mailer per documentation and send an email with a 202 response
Possible Solution
Check that the response code before decoding the response.
- If the response code is 202, do nothing
- If the response code is an error code, decode the response and use it in the exceptions for a clear error message