Skip to content

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

Merged
taylorotwell merged 2 commits into
laravel:11.xfrom
Roywcm:11.x
May 23, 2025
Merged

taylorotwell merged 2 commits into
laravel:11.xfrom
Roywcm:11.x

Conversation

@Roywcm

@Roywcm Roywcm commented May 23, 2025

Copy link
Copy Markdown
Contributor

(This is the same PR as #55803, but then for V11.)

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.

@taylorotwell
taylorotwell merged commit 72e0a0b into laravel:11.x May 23, 2025
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