Skip to main content
The Mailer API allows you to send transactional emails from your Stormkit environments.

Prerequisites

Before using the Mailer API:
  1. Configure the mailer settings for your environment (see Mailer documentation)
  2. 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

The body 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:
  1. Navigate to your environment’s configuration
  2. Set up your SMTP server details:
    • Host
    • Port (default: 587)
    • Username
    • Password
For detailed setup instructions, see the Mailer feature documentation.

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