attachments array in your /mail/send request body, where each element describes one file.
Attachment limits
The total size of your email, including all attachments, must be less than 24 MB. This limit covers the entire serialized message: headers, body, and all attachment content combined. Base64 encoding inflates binary files by approximately 33%, so a 16 MB binary file will produce roughly a 21 MB encoded string. Plan your attachment sizes accordingly.
Request format
Add anattachments array to your standard /mail/send request body. Each object in the array represents one attached file.
array
An array of attachment objects. Each object must include
name, type, and content. Use content_id only for inline content.Example with attachment
The following request sends an email with a single PDF attachment. Replace thecontent value with your actual Base64-encoded file data.
Send email with a PDF attachment
200 and the message ID:
Success response
Supported file types
turboSMTP accepts any valid MIME type in thetype field. The table below lists the most commonly used formats.
Multiple attachments
To include more than one file, add additional objects to theattachments array. Each object is independent: you can mix different file types in the same request.
Send email with multiple attachments
Inline images
Include an image inattachments with a bare content_id, such as logo. turboSMTP appends the sender’s domain to the MIME Content-ID. The HTML must therefore use cid:logo@example.com when the sender is sender@example.com. A bare cid:logo will not match the delivered image.
Message with an inline image
content with the image’s Base64 bytes, without a data:image/...;base64, prefix. Omit content_id to send a normal downloadable attachment.
Use the same body at https://api.turbo-smtp.com/api/v2/mail/send or the EU host https://api.eu.turbo-smtp.com/api/v2/mail/send, authenticated with both Consumer headers.