Skip to content

MailAttachment ​

One file attached to a send, supplied through MailOptions.Attachments.

Fields

FileName: string
Name the recipient sees. Resend uses it to infer a content type when none is given.

Content: byte[]
The file bytes. They are held in memory for the whole send, which is what bounds a workable attachment size rather than a limit the package imposes.

ContentType: string?
MIME type. Leave it null to let Resend infer one from the file name.
Default: null

Type signature ​

csharp
public sealed record MailAttachment
{
    public required string FileName { get; init; }
    public required byte[] Content { get; init; }
    public string? ContentType { get; init; }
}

All packages are released under the MIT License.