@antelopejs/dms-mailing

中文文档
0.9.0发布于 2026/11/05Apache-2.0TypeScriptCommonJS构建来源已验证近 30 天下载 1764

E-mail templates for the AntelopeJS DMS: a block editor with drafts and versions, a send log, delivery metrics and a suppression list.

原始使用文档
文档目录8 节
  1. What it does
  2. Install
  3. Quick start
  4. Compatibility
  5. Slugs
  6. Documentation
  7. Contributing
  8. License

@antelopejs/dms-mailing

npm License Discord Documentation

E-mail templates, sends and delivery metrics for the AntelopeJS DMS.

The Mailing overview of the Helio demo: reach, engagement and list health for the last 30 days, the send volume chart and the items that need attention

What it does

  • Designs e-mail templates in a block editor, with typed variables, conditions, lists and live test data.
  • Keeps edits in draft and publishes them as versions, in several locales.
  • Sends a template by its slug from your code, an automation or the dashboard, through any @antelopejs/interface-email provider.
  • Logs every send with the provider's timeline, and turns delivery, open and click events into an overview.
  • Protects your sender reputation with a suppression list fed by hard bounces, spam complaints and unsubscriptions.

Install

Run the AntelopeJS CLI from the root of a project that already loads @antelopejs/dms. Add an e-mail provider if the project has none:

ajs project modules add @antelopejs/dms-mailing
ajs project modules add @antelopejs/nodemailer

Quick start

In development, send to a throwaway Ethereal inbox:

// antelope.config.ts
nodemailer: {
  source: { type: "package", package: "@antelopejs/nodemailer", version: ">=0.0.6 <1.0.0" },
  config: { ethereal: true },
},

Restart the backend, then the frontend, and open Modules › Mailing (/modules/mailing/overview). On a workspace with no templates, create the Order confirmation template from the starter gallery and publish it. Its slug is order-confirmed. The New template dialog derives the slug from the name instead, so it gives order-confirmation. Check the slug before you send. Any module can then send it through @antelopejs/interface-dms-mailing:

import { SendTemplate } from "@antelopejs/interface-dms-mailing";

await SendTemplate("order-confirmed", {
  tenantId,
  to: "[email protected]",
  variables: {
    customer: { firstName: "Sofie" },
    order: {
      number: "#10482",
      total: { value: 4800, currency: "EUR" },
      lines: [{ name: "Linen shirt", total: { value: 4800, currency: "EUR" } }],
      url: "https://example.com/orders/10482",
    },
  },
});

Compatibility

PackageSupportedTested with
@antelopejs/interface-api>=0.3.0 <1.0.00.3.0
@antelopejs/interface-api-util>=0.3.0 <1.0.00.3.0
@antelopejs/interface-core>=0.4.0 <1.0.00.4.0
@antelopejs/interface-data-api>=0.6.1 <1.0.00.6.1
@antelopejs/interface-database>=0.3.0 <1.0.00.3.0
@antelopejs/interface-database-decorators>=0.2.0 <1.0.00.2.0
@antelopejs/interface-dms>=0.12.0 <1.0.00.12.0
@antelopejs/interface-dms-automation>=0.6.0 <1.0.00.6.0
@antelopejs/interface-dms-mailing>=0.10.0 <0.11.00.10.0
@antelopejs/interface-email>=0.0.6 <1.0.00.0.6

The module also needs:

  • A DMS backend in a release that implements the @antelopejs/interface-dms range in the table above.
  • The @antelopejs/dms-frontend renderer in the range of engines["@antelopejs/dms-frontend"] in frontend-vue/package.json. The ajs dms CLI refuses to build the module with a renderer outside that range.
  • A database module that enforces unique indexes, such as @antelopejs/mongodb or @antelopejs/postgres.
  • An e-mail provider, which is an @antelopejs/interface-email implementation such as @antelopejs/nodemailer.

Slugs

Sends find a template by its slug, so a slug belongs to one template per workspace. The slug index of the mailing_templates table is unique. Creating or duplicating a template on a slug another template holds, even in a race, answers 409 with $dms_mailing.errors.duplicate_slug and creates nothing. Deleting a template frees its slug. The unique index needs a database module that enforces unique indexes, such as @antelopejs/mongodb or @antelopejs/postgres. RethinkDB refuses the schema.

Documentation

The guide's sources live in packages/dms-mailing/docs. The module ships the dms-mailing Claude Code skill in packages/dms-mailing/skills, declared under antelopeJs.skills.

Contributing

This package lives in the AntelopeJS/dms-mailing pnpm workspace, next to @antelopejs/interface-dms-mailing. Read CONTRIBUTING.md and the repository README for the development commands.

License

Apache-2.0

版本与发布记录

@antelopejs/dms-mailing 共发布 17 个版本,首次发布于 2026/09/19;过去 12 个月发布了 17 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.9.0latest2026/11/054 天前
0.8.02026/11/027 天前
0.7.12026/10/2416 天前
0.7.02026/10/2317 天前
0.6.12026/10/2020 天前
0.6.02026/10/1823 天前

关于 @antelopejs/dms-mailing 的常见问题

@antelopejs/dms-mailing 是什么?

E-mail templates for the AntelopeJS DMS: a block editor with drafts and versions, a send log, delivery metrics and a suppression list.

如何安装 @antelopejs/dms-mailing?

在项目目录运行 npm install @antelopejs/dms-mailing,或使用 pnpm add / yarn add / bun add。

@antelopejs/dms-mailing 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@antelopejs/dms-mailing 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@antelopejs/dms-mailing 可以商用吗?

@antelopejs/dms-mailing 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@antelopejs/dms-mailing 的下载量有多少?

根据 npm 官方下载统计,@antelopejs/dms-mailing 在 2026/10/06 – 2026/11/04 这 30 天内被下载 1,764 次,日均约 59 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@antelopejs/dms-mailing 还在维护吗?

最新版本 0.9.0 发布于 2026/11/05(4 天前);至今共发布 17 个版本,其中过去 12 个月发布了 17 个;首次发布于 2026/09/19。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。