Skip to content
Back to skills

Elasticemail

ASecurity

Add Elastic Email to an existing project - sending transactional or bulk email, templates, attachments, webhook event handling, inbound email, contacts, double opt-in or domain setup - using the official Elastic Email SDK for the project's language. Use when the user asks to send email from their app, integrate Elastic Email, handle email webhooks or bounces, or receive inbound email with Elastic Email.

  • 22 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 24, 2026
developmentjavascripttypescriptpythongojavakotlinreactnextjsnodenodejs

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 9, 2026

npx -y skills add ElasticEmail/elasticemail-examples --skill elasticemail --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Elasticemail?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Elasticemail
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/elasticemail-elasticemail/badge)](https://www.skillsdirectory.com/skills/elasticemail-elasticemail)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: elasticemail
description: Add Elastic Email to an existing project - sending transactional or bulk email, templates, attachments, webhook event handling, inbound email, contacts, double opt-in or domain setup - using the official Elastic Email SDK for the project's language. Use when the user asks to send email from their app, integrate Elastic Email, handle email webhooks or bounces, or receive inbound email with Elastic Email.
---

# Elastic Email integration

Copy a working example from https://github.com/ElasticEmail/elasticemail-examples and adapt it,
instead of writing API calls from memory. The examples target REST API v4 with the official SDKs
(4.4 line); older v2 code you may remember uses different endpoints and parameters.

## 1. Find the matching example

1. Detect the project's stack from its manifest (`package.json` dependencies, `composer.json`,
   `requirements.txt`/`pyproject.toml`, `Gemfile`, `go.mod`, `pom.xml`, `*.csproj`, `Cargo.toml`,
   `mix.exs`) and whether it is TypeScript or JavaScript.
2. Fetch the use-case map:
   `https://raw.githubusercontent.com/ElasticEmail/elasticemail-examples/main/examples.json`.
   Pick the stack by `id` (`nextjs`, `nodejs` for Node.js with no framework, `nestjs`, `fastify`, `kotlin`, `laravel`, `python`, `go`, `serverless-cloudflare-workers`, ...)
   and the use case by `id` (`basic-send`, `batch-send`, `attachments`, `cid-attachments`,
   `templates`, `scheduled-send`, `prevent-threading`, `email-status`, `webhooks`, `inbound`,
   `contacts`, `double-optin`, `suppressions`, `domains`, `statistics`, `email-verification`,
   `sub-accounts`).
3. Read the listed files from `https://raw.githubusercontent.com/ElasticEmail/elasticemail-examples/main/<path>`,
   plus the stack's client helper (for example `src/lib/elasticemail.ts`, `examples/ee.py`,
   `internal/ee/ee.go`) and the matching guide under `docs/`.
4. If the stack is not listed, use the closest one in the same language, and
   `docs/api-map.md` for the SDK method names.
5. Outside the use-case map: `smtp-elasticemail-examples/<service>/` when a tool only takes SMTP
   settings, `email-templates-elasticemail-examples/` for React Email or MJML,
   `ai-agents-elasticemail-examples/` for an LLM tool, `queues-elasticemail-examples/` for sending
   from a background job.

## 2. Install and configure

- Install the SDK the stack entry names in `sdk` (for JS/TS: `@elasticemail/elasticemail-client-ts-axios`).
- Add to the project's env files and `.env.example`, never to source code:
  - `ELASTICEMAIL_API_KEY` - created in the Elastic Email dashboard, shown once
  - `EMAIL_FROM` - must be on a domain verified in Elastic Email
  - `ELASTICEMAIL_WEBHOOK_SECRET` - the signing secret returned once when a webhook is created with
    `EnableSigning: true` (only if you add webhook handlers)
  - `ELASTICEMAIL_WEBHOOK_TOKEN` - only if you add inbound handlers or unsigned webhooks
- Keep the key server-side. In Next.js, Nuxt, SvelteKit, Remix, Astro and similar, call the SDK only
  from server code (route handlers, server actions, `+server` files, `.server.ts` modules).

## 3. Adapt the code

- Match the project's existing structure, error handling and naming. Do not copy the example's demo
  UI pages.
- Transactional (one message) uses `emailsTransactionalPost`; bulk with per-recipient merge fields
  uses `emailsPost`. Keep both an HTML and a plain-text body.
- Retried sends need an `Idempotency-Key` (SDKs 4.4.0+; TS: `emailsTransactionalPost(message, key)`,
  other languages in `docs/api-map.md#idempotency-key`). Create one key per logical send (a UUID)
  before the first attempt, reuse it only for that send's retries with an identical body, and never
  derive it from the attempt number. In background jobs use the job, event or run id. Retry
  timeouts, 409, 429, 5xx and 503 (after `Retry-After`) with the same key; 422 means the body changed
  or keys collide, so fix the code. If the app exposes its own send endpoint, forward the caller's
  `Idempotency-Key` header.
- Webhook handlers: create webhooks with `EnableSigning: true` and `DeliveryMethod: "PostJson"`
  (SDKs 4.3.0+). Verify `X-ElasticEmail-Signature: v1=<hex>` = HMAC-SHA256 of
  `{X-ElasticEmail-Timestamp}\n{METHOD}\n{raw path+query}\n{raw body}` with the signing secret, against
  the raw body, within 5 minutes, in constant time; 401 on mismatch. Webhooks created without
  signing send **unsigned GET** requests with the event in the query string: verify `?token=` with a
  constant-time compare. Respond 2xx fast, and skip the test event sent on save
  (`to=test@test.com`, `messageid=abc1234`).
- Inbound handlers receive a **form POST** (`from_email`, `subject`, `body_text`, `body_html`,
  `att1_name`, `att1_content`, ...), protected with the same token check.

## 4. Tell the user what they must do outside the code

- Create an API key: https://help.elasticemail.com/en/articles/4799160-api-settings
- Verify the sending domain (SPF, DKIM): https://help.elasticemail.com/en/articles/4934400-how-to-verify-your-domain
- For webhooks or inbound email, the URL must be publicly reachable when it is saved in Elastic Email
  (use a tunnel such as ngrok during development).

Do not state prices or sending limits; point to https://elasticemail.com/email-api-pricing.
Troubleshooting by symptom: `docs/troubleshooting.md` in the examples repository.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.