Skip to content
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

[11.x] Add support for mime types in Resend mail transport #52006

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

jayanratna
Copy link
Contributor

This PR adds support for setting mime types on attachments inside your Resend Mailable class. With the introduction of the content_type parameter in the Resend email API, it is now possible to pass that information along to the Resend API.

With this addition it is now possible to use the withMime method to set a custom type for your attachment:

public function attachments(): array
{
    return [
        Attachment::fromPath('/path/to/file')
                ->as('name.pdf')
                ->withMime('application/pdf'),
    ];
}

@taylorotwell taylorotwell merged commit 903c702 into laravel:11.x Jul 3, 2024
28 checks passed
@jayanratna jayanratna deleted the patch-1 branch July 4, 2024 04:31
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.

None yet

2 participants