There are two ways to send attachments in your emails: from a remote file or from a local file.

Send attachments from a remote file

To send attachments from a remote file, you can use the path parameter. This parameter accepts a URL to the file you want to attach.

You can define the name of the file that will be attached using the filename parameter.

Send attachments from a local file

To send attachments from a local file, you will use the content parameter. This parameter accepts the Base64 encoded content of the file you want to attach.

You can also define the name of the file that will be attached using the filename parameter.

Limitations

Here are the limitations while sending attachments in Resend:

  • The maximum request size, including the file is 40MB
  • See the list of unsupported file types
  • Emails with attachments cannot be scheduled

Examples