Skip to content

Variable: emailAttachmentSchema

const emailAttachmentSchema: ZodObject<{ content: ZodOptional<ZodString>; contentType: ZodOptional<ZodString>; encoding: ZodOptional<ZodString>; filename: ZodString; }, $strict>

Schema for a single file attached to an outbound email.

  • filename: File name shown to the recipient (e.g. “report.pdf”).
  • content (optional): Inline file content as a string. For binary data set encoding (e.g. “base64”).
  • encoding (optional): Encoding of content (e.g. “base64”, “utf-8”, “hex”). Defaults to utf-8 when omitted.
  • contentType (optional): MIME type override (e.g. “application/pdf”). Inferred from the filename when omitted.