Skip to content

thormail/thormail-ecosystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

40 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ThorMail Logo

ThorMail Ecosystem

The God of Deliveries β€” High-performance, intelligent delivery orchestrator for email, SMS, push notifications, and webhooks.

Website β€’ Documentation β€’ Getting Started β€’ Contributing

MIT License Documentation NPM Org


⚑ What is ThorMail?

ThorMail is a self-hosted message delivery orchestrator designed to be the intelligent bridge between your application and any delivery provider. Whether you're sending transactional emails, SMS, push notifications, or webhooks, ThorMail routes and manages delivery through your chosen adapters with extreme speed and reliability.

Note: ThorMail does not deliver messages directly to the final recipient. Instead, it routes and manages delivery through your configured adapters (SendGrid, AWS SES, Twilio, SMTP, etc.).

Key Highlights

  • πŸš€ Extreme Speed β€” Ultra-fast asynchronous API with responses in milliseconds
  • ⚑ Automatic Failover β€” Configure multiple adapters with priority-based routing
  • πŸ”Œ Zero Vendor Lock-in β€” Switch providers instantly, no code changes required
  • πŸ”’ Self-Hosted & Secure β€” Your data never leaves your infrastructure
  • πŸ“¦ Multi-Channel β€” Email, SMS, Push Notifications, Webhooks, and more

πŸ“‚ Repository Structure

This monorepo contains the open-source ecosystem components for ThorMail:

thormail-ecosystem/
β”œβ”€β”€ Adapters/               # Provider adapter packages (NPM modules)
β”‚   └── thormail-adapter-*  # Community & official adapters
β”œβ”€β”€ Clients/                # SDK clients for various platforms
β”‚   β”œβ”€β”€ js/                 # Official Node.js client (@thormail/client)
β”‚   └── wordpress/          # Official WordPress plugin
β”œβ”€β”€ Dockers/                # Docker images for the ecosystem
β”‚   └── Postgres18/         # PostgreSQL 18 with pg_partman
└── .github/                # Issue templates & security policy

What's Included

Component Description
Adapters Modular provider integrations (SMTP, SendGrid, Twilio, etc.) that translate ThorMail requests into provider-specific API calls
Clients Official SDK clients for Node.js and WordPress to interact with your ThorMail instance
Docker Images Pre-configured PostgreSQL image optimized for high-throughput delivery workloads

What's NOT Included

The ThorMail Core (Backend, Worker, and Dashboard) is distributed separately as compiled Docker images and is subject to its own proprietary license. Visit thormail.io for more information.


πŸš€ Getting Started

Prerequisites

  • Docker Engine 20.10+
  • A running ThorMail Core instance (Backend, Worker, Dashboard)

Installation

For complete installation instructions, including Core setup, visit the Official Documentation.

Quick Start with the Node.js Client

npm version

npm install @thormail/client
import { ThorMailClient } from '@thormail/client';

const client = new ThorMailClient({
  baseUrl: 'https://api.your-thormail-server.com',
  workspaceId: 'your-workspace-id',
  apiKey: 'your-api-key'
});

// Send an email
const result = await client.send({
  to: 'user@example.com',
  subject: 'Welcome to ThorMail!',
  body: '<h1>Hello {{name}}!</h1>',
  data: { name: 'John' }
});

console.log('Queued with ID:', result.id);

⚠️ Security Warning: The Node.js client is designed for server-side use only. Never expose your API key in client-side code.


πŸ“¦ Available Packages

Official Adapters

Note: "Official" means these adapters are developed and maintained by the ThorMail team. They are not affiliated with or endorsed by the service providers themselves (e.g., OneSignal, SendGrid, etc.).

Service Name Package Type Description NPM
Mailchimp Transactional thormail-adapter-mandrill-email EMAIL High-volume transactional email delivery platform by Mailchimp. npm
OneSignal thormail-adapter-onesignal EMAIL Market-leading customer engagement platform for push notifications. npm
Resend thormail-adapter-resend EMAIL Modern, developer-first email API for building transactional emails. npm
Amazon SES thormail-adapter-ses EMAIL Scalable, cost-effective, and reliable cloud-based email service. npm
SMTP thormail-adapter-smtp EMAIL Standard protocol for sending emails via any custom mail server. npm
Telegram thormail-adapter-telegram TELEGRAM Cloud-based messaging app with an extensive API for bots. npm
Generic REST thormail-adapter-generic-rest REST Universal adapter to connect with any RESTful API endpoint. npm

About the type Field

The Type column indicates how ThorMail routes messages to adapters. When you send a message with a specific type (e.g., type: 'TELEGRAM'), ThorMail routes it to all adapters matching that type.

  • EMAIL (default): Adapters without an explicit type handle standard email messages.
  • Custom types (TELEGRAM, SMS, DISCORD, etc.): Completely open-endedβ€”you invent the type, and messages using it are routed to matching adapters.

You can have multiple adapters of the same type installed simultaneously. ThorMail will distribute load among them based on priority and health status.

πŸ“– Learn more: Creating Adapters - getMetadata()

Official Clients

Package Platform NPM
@thormail/client Node.js npm
thormail WordPress WordPress Plugin

Docker Images

Image Description Docker Hub
thormail/postgres-thormail PostgreSQL 18 + pg_partman Docker

πŸ”Œ Creating Custom Adapters

ThorMail's modular adapter system allows you to connect to any provider. Adapters are NPM packages that follow a standardized interface.

Naming Convention

thormail-adapter-{provider-name}

Basic Adapter Structure

// index.js
export default class MyServiceAdapter {
  static getConfigSchema() {
    return [
      { name: 'apiKey', label: 'API Key', type: 'password', required: true },
      { name: 'from_email', label: 'From Email', type: 'text', required: true }
    ];
  }

  static getMetadata() {
    return {
      name: 'My Service',
      description: 'Send messages via MyService API'
    };
  }

  constructor(config) {
    this.config = config;
  }

  async sendMail({ to, subject, body, data }) {
    // Your implementation here
    return { success: true, id: 'message-id' };
  }

  async validateConfig() {
    return { success: true, message: 'Valid!', canValidate: true };
  }

  async healthCheck() {
    return 'HEALTHY';
  }
}

For detailed instructions, see the Official Adapter Documentation.


πŸ”’ Security

If you discover a security vulnerability, please do not report it in a public issue.

πŸ“§ Email: security@thormail.io

We will acknowledge receipt within 48 hours and follow responsible disclosure practices.


🀝 Contributing

We welcome contributions from the community! Whether you're creating a new adapter, improving documentation, or fixing bugs, your help is appreciated.

  1. Discuss First: Open a Discussion before major changes
  2. Follow Guidelines: Read our Contributing Guide
  3. Test Thoroughly: Ensure your code works in a non-production environment
  4. Submit PR: Open a pull request with clear descriptions

Bug Reports & Feature Requests

Use our Issue Templates:

  • πŸ› Adapter Bug β€” Issues specific to an adapter
  • πŸ”§ Core Issue β€” Orchestrator logic bugs (include Docker version)
  • ✨ Feature Request β€” New functionality proposals

πŸ“œ License

This repository is licensed under the MIT License.

Important: This license applies exclusively to the open-source adapters, clients, and documentation in this repository. The ThorMail Core (distributed as compiled Docker images) is NOT covered by this license and is subject to its own proprietary End-User License Agreement (EULA).

See LEGAL.md for full legal information and disclaimers.


πŸ“š Resources


ThorMail: Orchestrating the future, one delivery at a time.

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors