Optionaloptions: { env?: string; host?: string; token?: string }ProtectedenvProtectedhostProtectedtokenDownload an attachment's binary content.
The UUID of the email message
The UUID of the attachment
The raw binary data as an ArrayBuffer
Get a single email by its message ID.
The UUID of the email message
The full email log entry
List emails for the current project with optional filtering and pagination.
Optionalparams: ListEmailsParamsOptional query parameters for filtering and pagination
Paginated list of email log entries
List attachment metadata for a specific email.
The UUID of the email message
Array of attachment metadata entries
Resend a previously failed email. Resets the retry counter and re-queues the email for delivery.
The UUID of the email to resend
Confirmation with the message ID
Send an email. The email is queued for async delivery.
Supports both JSON body (with base64-encoded attachments) and multipart/form-data (with file uploads).
The email content and recipients
The queued email's message ID and status
const result = await mail.send({
to: ["recipient@example.com"],
cc: ["cc@example.com"],
subject: "Invoice #123",
body: "<p>Please find your invoice attached.</p>",
reply_to: "billing@company.com",
sender_name: "Billing Department",
attachments: [{
file_name: "invoice.pdf",
mime_type: "application/pdf",
content: "base64encodedcontent...",
size: 12345
}]
})
SDK client for the Protokol Mail integration.
Provides methods to send emails, list email logs, resend failed emails, and manage attachments through the Protokol Mail API.
Example