Skip to content

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
@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.

2 participants