How to send emails with attachments using the SendLayer API
attachments
array in your email parameters. The SendLayer SDKs handle file encoding automatically, so you only need to provide the file path and type.
<apiKey>
with your actual SendLayer API key in the request header. The Content
field in the cURL example should contain the actual base64-encoded file content.attachments
array.
application/pdf
, application/msword
, application/vnd.openxmlformats-officedocument.wordprocessingml.document
application/vnd.ms-excel
, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
image/jpeg
, image/png
, image/gif
text/plain
, text/csv
application/zip
, application/x-rar-compressed
What is the maximum file size for attachments?
How many files can I attach to a single email?
What file formats are supported?
How do I attach files with the SDK?
Can I attach files when sending to multiple recipients?
What should I do if my attachment is too large?