Request Parameters
The following parameters are used when sending an email:| Parameter | Type | Required | Description |
|---|---|---|---|
sender_address | string | Yes | Email address that will appear in the “From” field |
recipient_address | string | Yes | Email address of the recipient |
subject | string | Yes | Subject line of the email |
body | string | Yes | Content of the email (plain text or HTML) |
headers | object | No | Optional email headers as key-value pairs (cc, bcc, etc.) |
attachment_uri | array | No | Array of URIs pointing to files you want to attach to the email |
Code Examples
We’d love to hear from you!Don’t hesitate to reach out to [email protected] or [email protected] if there’s any features you’d like to see or prioritised!
Working with Attachments
To include attachments in your emails, use theattachment_uri parameter which accepts an array of URLs pointing to the files you want to attach.
Supported Attachment Types
A1Mail supports most common file types for email attachments, including but not limited to:- PDF documents (*.pdf)
- Images (*.jpg, *.jpeg, *.png, *.gif)
- Office documents (*.docx, *.xlsx, *.pptx)
- Text files (*.txt, *.csv)
Attachment Size Limits
Attachments are subject to size limitations. Please ensure your attachments adhere to the following guidelines:- Individual attachment: Maximum 10MB
- Total attachments per email: Maximum 25MB
Hosting Attachments
Attachments must be accessible via a public URL. You can use your own hosting solution or any publicly accessible file storage service. Make sure the URLs provided in theattachment_uri array are directly accessible without authentication.
