
它会做什么
- 在块编辑器中设计电子邮件模板,包含被键入的变量,条件,列表和活测试数据.
- 保留草案中的编辑,并作为版本出版,在多个地块中.
- 从您的代码、自动化程序或仪表板中通过任何程序发送模板
@antelopejs/interface-email供养. - 记录每个发送与提供者的时间表,并将发送,打开和点击事件变成一个概览.
- 用硬弹跳、垃圾邮件投诉和未订阅的压制清单保护发件人的名声.
安装
从已加载的工程根端运行 AtelopeJS CLI @antelopejs/dms如果项目没有电子邮件提供者,则添加:
ajs project modules add @antelopejs/dms-mailing
ajs project modules add @antelopejs/nodemailer
快开始
在开发中,发送到一个丢弃的Etheal收件箱:
// antelope.config.ts
nodemailer: {
source: { type: "package", package: "@antelopejs/nodemailer", version: ">=0.0.6 <1.0.0" },
config: { ethereal: true },
},
重新打开后端, 然后打开前端 模块 QQ 邮件 (单位:千美元)/modules/mailing/overview) (中文(简体) ). 在没有模板的工作空间上创建 命令确认 模板来自启动画廊并发布。 它的子弹是 order-confirmed编辑 新模板 对话框从名称中取出 sults, 所以它给出 order-confirmation在发送前检查子弹 任何模块都可以通过 @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",
},
},
});
兼容性
| 软件包 | 支助 | 测试过 |
|---|---|---|
@antelopejs/interface-api | >=0.3.0 <1.0.0 | 0.3.0 |
@antelopejs/interface-api-util | >=0.3.0 <1.0.0 | 0.3.0 |
@antelopejs/interface-core | >=0.4.0 <1.0.0 | 0.4.0 |
@antelopejs/interface-data-api | >=0.6.1 <1.0.0 | 0.6.1 |
@antelopejs/interface-database | >=0.3.0 <1.0.0 | 0.3.0 |
@antelopejs/interface-database-decorators | >=0.2.0 <1.0.0 | 0.2.0 |
@antelopejs/interface-dms | >=0.12.0 <1.0.0 | 0.12.0 |
@antelopejs/interface-dms-automation | >=0.6.0 <1.0.0 | 0.6.0 |
@antelopejs/interface-dms-mailing | >=0.10.0 <0.11.0 | 0.10.0 |
@antelopejs/interface-email | >=0.0.6 <1.0.0 | 0.0.6 |
模块还需要:
- 执行此功能的版本中的 DMS 后端
@antelopejs/interface-dms区域. - 这个
@antelopejs/dms-frontend渲染器在engines["@antelopejs/dms-frontend"]内frontend-vue/package.json编辑ajs dmsCLI拒绝使用该范围外的渲染器来构建模块. - 一个执行独特索引的数据库模块,例如
@antelopejs/mongodb或者说@antelopejs/postgres。 。 。 . - 电子邮件提供者,即
@antelopejs/interface-email执行,例如@antelopejs/nodemailer。 。 。 .
块
发送者通过它的sult找到一个模板,所以每个工作空间有一个sult属于一个模板. 这个 slug 指数 mailing_templates 表格是独一无二的。 在 sattle 上创建或复制模板另一个模板的答案,即使在比赛中也是如此 409 与 $dms_mailing.errors.duplicate_slug 并创造出什么。 删除模板将释放其弹出。 独特的索引需要一个执行独特的索引的数据库模块,例如 @antelopejs/mongodb 或者说 @antelopejs/postgres重新思考DB 拒绝计划.
文档
向导的消息来源 packages/dms-mailing/docs模块将 dms-mailing Claude代码技巧 packages/dms-mailing/skills,在 antelopeJs.skills。 。 。 .
捐款
这个包裹住在 AntelopeJS/dms-mailing pnpm 工作空间旁边 @antelopejs/interface-dms-mailing读取 捐款额 编辑 仓库读取器 用于开发命令.