Elastic Email¶
Elastic Email delivery via HTTP API. Registers an email delivery strategy named elastic_email with the notification module's strategy pool, sending transactional email through Elastic Email's v2 POST /email/send endpoint over httpx. Choose it when you want API-key-based email delivery through an Elastic Email account rather than SMTP or AWS.
At a glance
| Extension id | elastic_email |
| Category | communication |
| Version | 0.0.1 |
| Provides | Email delivery strategy (elastic_email) |
| External account | Elastic Email — API key (required) |
What It Provides¶
- Email delivery strategy —
ElasticEmailStrategy(ext_elastic_email/strategy.py), an implementation of the coreEmailDeliveryStrategyinterface, registered aselastic_emailviaregister_email_strategy("elastic_email", ElasticEmailStrategy)on activation. Registration is claimed in the registration ledger — see Email delivery in Building Extensions. - Each send posts a form-encoded request to
{api_url}/email/sendcarryingapikey,from,fromName,to,subject,bodyHtml, andbodyText, with a 60-second HTTP timeout. - Nothing else — no webhook endpoints, Temporal workflows, schedules, admin pages, GraphQL fields, or event subscriptions.
Setup¶
- Once installed (or dev-linked in development), the extension is discovered at startup. It uses
httpx, which is a core dependency — no extra install is needed. - Enable the extension for a channel from Settings > Extensions (per-channel activation via
ChannelExtension). - Make it the active email provider on Settings > Email: the page lists Elastic Email as a provider option (it checks that the
elastic_emailextension is installed) with fields for the API key and API URL alongside the default from address/name. Saving writes theemail_providerplatform setting that the notification service reads at send time.
Configuration Reference¶
| Key | Type | Required | Secret | Description |
|---|---|---|---|---|
api_key |
string | Yes | Yes | — |
default_from_email |
string | No | No | Defaults to empty |
default_from_name |
string | No | No | Defaults to Vectis Commerce |
api_url |
string | No | No | Defaults to https://api.elasticemail.com/v2 |
Note
This schema drives the generic Configure form on Settings > Extensions. The credentials actually used at send time come from the email_provider platform setting (managed on Settings > Email) — the notification service does not read the per-channel extension config when building the strategy.
Operational Notes¶
- Send-time construction. The notification service builds the strategy from the
email_providersetting on every send: the setting's keys (minusprovider) are passed as constructor arguments —api_key,default_from,default_from_name, and optionalapi_url. If the setting is missing, names an unknown provider, or construction fails, delivery silently falls back to the console (dev logging) strategy and the failure is logged server-side. - Response handling. The strategy parses Elastic Email's JSON envelope: on
success: truethedatavalue is recorded as the message id; onsuccess: falsethe API'serrorstring is surfaced. A non-JSON 2xx response still counts as sent (without a message id); any other HTTP status is reported asHTTP <status>with the response body. - Custom API URL. The
api_urlvalue is configurable (trailing slashes are stripped), so a proxy or regional endpoint can be substituted for the default v2 API base. - Batch sends are sequential.
send_batchloops over singlePOST /email/sendcalls. - Every templated send is recorded in
notification_logswith the provider name and message id. - Alternative email providers: built-in SMTP and console strategies ship with core; Amazon SES is available as another extension.