Prerequisites
- A Plunk account
- A secret key from the Plunk dashboard
Sending an email with attachments
Sending a transactional email with attachments requires a single API call with the following parameters: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).
Example
Note: You can include up to 5 attachments per email. The content field must be base64 encoded.