Learn how to send a transactional email with attachments
to
, subject
, body
, and optionally attachments
.
to
: A single email address or an array of email addresses.subject
: The subject of the email.body
: The body of the email. This can be plain text or HTML.attachments
: An array of up to 5 attachment objects. Each object must contain:
filename
: The name of the file as it will appear in the email.content
: The file content, base64 encoded.contentType
: The MIME type of the file (e.g., application/pdf
, image/png
).
Note: You can include up to 5 attachments per email. The content
field must be base64 encoded.