You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
When using the Sendgrid HTTP transport; Sending an email with an attachment results in an error 400 "The attachment content must be base64 encoded." Exception.
The Sendgrid API does not like line breaks in the base64 encoded attachment content it appears, but the Base64Encoder in Mime do.
How to reproduce
Create a new Symfony\Component\Mime\Email, attach some arbitrary content and send the email.
Possible Solution
In Symfony\Component\Mailer\Bridge\Sendgrid\Http\Api\SendgridTransport::getAttachments, replace the \r\n in the content returned from $attachment->bodyToString.