Skip to content

Add support for sending raw (non-encoded) attachments in Resend mail driver #55803

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

Merged
merged 2 commits into from
May 21, 2025

Conversation

Roywcm
Copy link
Contributor

@Roywcm Roywcm commented May 21, 2025

This PR adds support for sending raw (non-base64 encoded) attachments in the Resend mail driver, which is useful for cases like sending .ics (calendar) files.

The Resend API currently does not properly handle base64-encoded .ics attachments. As a workaround, this PR allows certain attachments (e.g., with the text/calendar MIME type) to be sent as raw content without encoding.

Changes

  • Introduces conditional logic in ResendTransport to skip encoding when the attachment has a media type of text/calendar

Why this is needed

  • Resend currently fails to decode base64 .ics attachments properly.
  • Users sending calendar invites need the .ics file to be sent as plain text for compatibility with calendar clients.

I couldn't find any tests for the Resend driver?

@taylorotwell taylorotwell merged commit 318cad4 into laravel:12.x May 21, 2025
32 checks passed
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.

2 participants