Node.js examples for integrating Keplars email service. Choose the approach that fits your use case.
npm install keplarsimport { Keplars } from 'keplars';
const keplars = new Keplars({ apiKey: 'kms_your_api_key' });
const response = await keplars.emails.sendInstant({
to: 'user@example.com',
from: 'hello@yourdomain.com',
subject: 'Hello!',
html: '<h1>Hello World</h1>',
});Full Express.js + TypeScript demo using the official keplars npm SDK. Covers transactional emails, bulk/scheduled marketing emails, webhook signature verification, and priority queue usage.
Raw REST API integration using Axios. Minimal setup, no SDK dependency.
Traditional SMTP integration via Nodemailer. Best for migrating from existing SMTP providers.
npm install keplarsimport { Keplars } from 'keplars';
const keplars = new Keplars({ apiKey: 'kms_your_api_key' });
const response = await keplars.emails.sendInstant({
to: 'user@example.com',
from: 'hello@yourdomain.com',
subject: 'Hello!',
html: '<h1>Hello World</h1>',
});cd sdk-example
cp .env.example .env
npm install
npm run devServer starts on http://localhost:8080.
- Node.js 18+
- A Keplars API key (get one here)
- Python Examples — FastAPI + async/await
- Kotlin Examples — Ktor + coroutines
- Java Examples — Spring Boot + CompletableFuture
MIT