[data-reveal]{opacity:1!important;transform:none!important}
AntelopeJS DMS
DocumentationFAQ

FAQ

Answers to the common questions and problems with the Mailing module.

My code gets a send with the status suppressed

The recipient is on the suppression list after a hard bounce, a spam complaint, an unsubscription or a manual entry. error names the reason as an i18n key: $dms_mailing.errors.suppressed.hard_bounce, ….complaint, ….unsubscribe or ….manual. Do not retry. If the address is valid again, reactivate it first.

A send was refused for a missing variable

Settings › Delivery guards › Missing variables is set to Refuse the send, and the call did not pass a required variable. Pass it in variables, or switch the guard to Send anyway to send with blanks. Under Refuse the send, a marketing template whose footer shows the unsubscribe or preferences link also needs unsubscribeUrl or preferencesUrl. A real send from the dashboard refuses a missing required variable, those URLs included, whatever the guard says. A test send never needs those URLs.

My provider's webhook calls are refused

Settings › Provider & webhook › Webhook status shows the last refused call and its reason:

ReasonFix
missing_secretSend the x-mailing-webhook-secret header. Most providers cannot add one, so put a relay in front.
bad_secretCopy the current secret again. Rotating the secret invalidates the old one. A workspace that has never opened a mailing page or sent anything has no secret yet.
invalid_eventThe body is not in the generic event format.

The webhook URL points to localhost

The URL starts with the DMS clientBaseUrl, else the DMS apiBaseUrl, else the origin of the API server. Set clientBaseUrl to the public origin of the dashboard in the dms module's config.

The logo is missing from my e-mails

The logo is the DMS branding's e-mail logo (branding.logo.email.light, else branding.logo.default.light), at an absolute public URL. The module leaves it out on a localhost, private-IP, .local or .internal host, and for SVG files, which Gmail and Outlook refuse. The standalone HTML renderer draws no logo. Use a PNG and a public clientBaseUrl.

A recipient got the fallback locale instead of de

The template has no de version, so the module sent the workspace's fallback locale. The send log shows it (DE asked), and the editor offers to create the missing locale.

Do edits change what customers receive?

No. Edits stay in a draft until you publish. Real sends always use the published version, and every send records the version it used.

My code changed a declared template, but the dashboard still shows the old one

DeclareTemplate writes a template once. When the workspace already has the slug, the call returns kept and writes nothing, whatever the code declares. That holds whether the template came from an earlier declaration or from the dashboard. To ship the new content to an existing workspace, edit the template in the editor and publish it. See Ship templates as code.

Does a kept declaration mean the template can send?

No. kept means the workspace already has the slug. It says nothing about whether the template is live. The result's version is the last published version, or 0. Archiving or unpublishing the template in the dashboard stays effective. A kept declaration does not check its category, so a removed category does not make it fail.

A declaration rejected, but the template appears in the dashboard

The template and its first published version are written in one step. Writing the separate history row and refreshing the attention list come after, so a storage failure there rejects the call after the template exists. The template keeps its complete latest version, so its history and its numbered-version previews stay readable. The next publication of the template writes the missing history row before it replaces the version. Retrying the declaration returns kept and does not repair the row. Do not delete the template to retry. See the consumer reference for the concurrency and failure rules.

A user turned e-mail on for a notification but gets nothing

Look in Sends for a dms-notification send to the user. A suppressed or failed one says why. Without a send, the e-mail channel skipped the notification, and the backend's debug log names the reason: the send named no workspace (tenantId), the title or description was a $ translation key, the user has no validated address, or the user left the workspace. See When nothing is mailed.

The project does not start offline with Ethereal

@antelopejs/nodemailer with ethereal: true creates its test account over the internet when the project starts. A failure there stops the whole project before Mailing runs. While offline, use a local SMTP server such as Mailpit or MailHog, as Installation shows. Once a project runs, a provider that fails or cannot be reached only marks the sends failed and shows the provider banner on the Sends page. Nothing crashes.

I upgraded to 0.7: what changed?

Check the new DMS backend and renderer ranges in the compatibility block of the module README, and upgrade them together with Mailing.

  • Database. The template slug is a unique index, so the database module must enforce unique indexes, as @antelopejs/mongodb and @antelopejs/postgres do. RethinkDB refuses the schema. Creating or duplicating a template on a taken slug answers 409 with $dms_mailing.errors.duplicate_slug.
  • Declarations. DeclareTemplate and DeclareTemplateCategory write once. An existing slug or category id is kept, whatever the code declares next. A declared template is created already published as version 1.
  • When to declare. Call DeclareTemplate, DeclareTemplateCategory, DeclareSender, DeclareWebhookSecret and ImportSends from a Hook.TENANT_BEING_PROVISIONED handler.
  • Data. No migration runs. Reset the database.

I upgraded to 0.6: what changed?

Mailing 0.6 implements a new minor line of interface-dms-mailing. Upgrade the runtime alongside the interface before you use DeclareTemplate, DeclareTemplateCategory or ImportSends. All three require an explicit, non-blank tenantId. SendTemplate and RecordEmailEvent keep their contracts. Mailing 0.6.0 keeps the DMS backend and renderer requirements of 0.5. Mailing 0.6.1 needs a newer @antelopejs/dms-frontend renderer. See Ship templates as code for when to call the declarations and how to retry them.

I upgraded to 0.5: what changed?

Mailing 0.5 needs a newer DMS backend, @antelopejs/interface-dms line and @antelopejs/dms-frontend renderer than 0.4. The compatibility block of the module README lists the ranges. Upgrade those dependencies together first. Troubleshooting covers dependency resolution and frontend integration errors. Templates, sends, settings and the webhook URL are unchanged, so no data migrates. The interface-dms-mailing line is unchanged too, so modules that call SendTemplate need no change.

I upgraded from 0.3: what changed?

The v2 redesign neither reads what 0.3.x wrote nor takes its calls:

  • Webhook URL. POST /api/mailing/events/<provider>, with the tenant in the body, is gone. Copy the URL that Settings › Provider & webhook shows (/api/mailing/events/<provider>/<tenantId>) into the provider again.
  • Settings writes. POST /api/mailing/settings is gone. Send the changed fields with PUT /api/mailing/settings. A write that carries a read-only field (webhookUrl, provider) is refused.
  • Categories. The settings take categories as an array only, no longer as its JSON text. The array always holds the marketing category, which can be renamed but not removed, because campaign rules depend on it.
  • Interface. The module implements a newer interface-dms-mailing line, whose SendStatus adds suppressed.
  • Data. The module no longer reads a 0.3.x database, with its settings rows without the tenant key, templates without version numbers and sends without a stage. Start the module on an empty database.