Prerequisites
Before using the Mailer API:- Configure the mailer settings for your environment (see Mailer documentation)
- Generate an Environment-level API Key
Send Email
endpoint
Send a transactional email.
Request Body
string
required
Recipient email address. For multiple recipients, separate with semicolons (;)
string
required
Sender email address (can include name: “Jane Doe <jane@example.org>”)
string
required
Email subject line
string
required
Email body content. Supports HTML formatting
Response
boolean
Whether the email was sent successfully
Multiple Recipients
To send an email to multiple recipients, separate email addresses with semicolons:HTML Email Body
Thebody field supports HTML content. The API automatically wraps your content in proper HTML structure:
Error Responses
Returned when:
- Email body is empty
- Subject is empty
- Mailer is not configured for the environment
Returned when the SMTP server fails to send the email. The error message will contain details from the mail server.
Configuration
Before using this API endpoint, you must configure SMTP settings for your environment:- Navigate to your environment’s configuration
- Set up your SMTP server details:
- Host
- Port (default: 587)
- Username
- Password
Email Tracking
All emails sent through the Mailer API are stored in your environment’s database for tracking and audit purposes. This includes:- Sender address
- Recipient address(es)
- Subject line
- Email body
- Timestamp