Skip to main content

Email Worker

Sends emails via Nodemailer. Requires the optional nodemailer package (npm install nodemailer).

Included in Base Preset

Registered automatically by registerBasePlugins() / registerAllPlugins().

Registration​

import { pluginRegistry } from '@unchainedshop/core';
import { EmailPlugin } from '@unchainedshop/plugins/worker/email';

pluginRegistry.register(EmailPlugin);

Environment Variables​

VariableDefaultDescription
MAIL_URL-SMTP connection URL, e.g. smtp://user:pass@smtp.example.com:587 (required in production)
UNCHAINED_DISABLE_EMAIL_INTERCEPTION-Set to disable email interception in non-production

Email Interception​

Outside NODE_ENV=production, emails are not sent — they are written to a temp HTML file and opened in your browser for preview. Set UNCHAINED_DISABLE_EMAIL_INTERCEPTION=true to send real emails in development instead.

Adapter Details​

PropertyValue
Keyshop.unchained.worker-plugin.email
TypeEMAIL
Sourceworker/email