OptionalcidOptional content id for using inline images in HTML message source. Using cid sets the default contentDisposition to 'inline' and moves the attachment into a multipart/related MIME node, so use it only if you actually want to use this attachment as an embedded image.
OptionalcontentContents of the attachment stored in a string, buffer or stream.
OptionalcontentContent disposition type of the attachment. Defaults to attachment.
OptionalcontentEncoding for the attachment transfer. Will be derived from the contentType property, if not set. Example values: quoted-printable, base64. If it is unset then base64 encoding is used for the attachment. If set to false, the previous default applies (base64 for most, 7bit for text).
OptionalcontentContent type of the attachment. Will be derived from the filename property, if not set.
OptionalencodingEncoding used to encode the content to a buffer. Example values: base64, hex, binary etc. Useful if you want to use binary attachments in a JSON formatted e-mail object.
OptionalfilenameFilename to be reported as the name of the attached file, use of unicode is allowed. If you do not want to use a filename, set this value to false, otherwise a filename is generated automatically.
OptionalheadersAdditional headers to be sent with the attachment.
OptionalpathFile path or URL (data URIs are allowed as well) if you want to read a file instead of including it (better for larger attachments).
OptionalrawA raw value that overrides entire node content in the MIME message. If used, all other options set for this node are ignored.
Copyright Ⓒ 2025 SAP SE or an SAP affiliate company. All rights reserved.
Represents an attachment. This interface is compatible with
Attachmentofnodemailer.