Standard Delivery
SMTP servers, SendGrid, Mailgun, AWS SES, Twilio (SMS), and Push services.
Adapters are the core of ThorMail’s flexibility. They act as bridges between ThorMail’s standardized interface and specific delivery providers.
An adapter is a JavaScript class that acts as a universal translator. It takes ThorMail’s generic message format and converts it into specific actions for any external system.
While most users start with email, the possibilities are infinite. An adapter can be as complex as a global delivery network or as trivial (and absurd) as blinking a smart bulb.
Standard Delivery
SMTP servers, SendGrid, Mailgun, AWS SES, Twilio (SMS), and Push services.
Business Logic
Post data to a CRM, trigger a Zapier automation, or update a database record.
The Unusual
Print a physical copy on a thermal printer, send a fax, or post to a Slack channel.
The Absurd
Blink a Philips Hue light for every 1,000 emails sent or log messages to a physical LED ticker.
Basically, if it has an API, a CLI, or a network connection, you can build a ThorMail adapter for it.
Your App → ThorMail API → Queue → Worker → Adapter → ProvidersendMail() methodAll adapters in ThorMail are installed via the dashboard using NPM. ThorMail acts as a package manager, allowing you to search for, install, and manage your delivery engines directly from the UI.
# Example from ThorMail dashboardAdapters → Install → thormail-adapter-sendgridPopular adapters available on NPM:
thormail-adapter-smtp (Universal)thormail-adapter-sendgridthormail-adapter-mailgunthormail-adapter-aws-sesthormail-adapter-twiliothormail-adapter-onesignalthormail-adapter-webhookEvery adapter implements this interface:
class MyAdapter { // Defines the configuration form static getConfigSchema() { }
// Provides adapter metadata static getMetadata() { }
// Initializes with user config constructor(config) { }
// Sends a message async sendMail({ to, subject, body, data, idempotencyKey }) { }
// Validates configuration async validateConfig() { }
// Processes webhooks async webhook(event, headers) { }
// Health check async healthCheck() { }}For enterprise or internal deployments, you can configure a private NPM registry (such as Verdaccio) to host your proprietary adapters.
Path: Settings / Global / NPM Registry
Benefits: