Skip to content

KeplarsHQ/nodejs-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Keplars Node.js Examples

Node.js examples for integrating Keplars email service. Choose the approach that fits your use case.

SDK Install

npm install keplars
import { 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>',
});

Examples

1. SDK Example (sdk-example/) — Recommended

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.

View SDK Example →

2. API Example (api-example/)

Raw REST API integration using Axios. Minimal setup, no SDK dependency.

View API Example →

3. SMTP Example (smtp-example/)

Traditional SMTP integration via Nodemailer. Best for migrating from existing SMTP providers.

View SMTP Example →

SDK Install

npm install keplars
import { 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>',
});

Quick Start (SDK Example)

cd sdk-example
cp .env.example .env
npm install
npm run dev

Server starts on http://localhost:8080.

Prerequisites

Related Examples

License

MIT

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors