LogoRobo.js
Packages@robojs/auth

MailAttachment

Type Alias: MailAttachment

type MailAttachment = {
  content: Buffer | string;
  contentType: string;
  filename: string;
};

Attachment payload supplied to a mailer when sending transactional emails. Not every provider supports attachments—consult your mailer for limits.

Type declaration

NameTypeDescription
contentBuffer | stringFile data, either as a Buffer or base64 string.
contentType?stringMIME type for the attachment. Many providers infer this automatically.
filenamestringFilename visible to recipients (e.g. invoice.pdf).

Example

{ filename: 'receipt.pdf', content: pdfBuffer, contentType: 'application/pdf' }

On this page