SocialHub.AI
资源 · 开发者中心

电子邮件传送提供商

通过您已运行的电子邮件服务提供商发送邮件。管理员在后台配置一个或多个服务提供商以及有序的备用方案; Flash 邮件以瀑布流的形式依次发送,最终都到达平台托管的电子邮件服务。该提供商是 仅限运输交换 — Flash 仍然会注入跟踪、个性化、A/B 分支和退订处理功能,因此营销活动的构建或衡量方式不会发生任何变化。

您可以连接哪些内容

已配置 设置 → 电子邮件提供商 由组织管理员设置——绝不会由营销人员针对每个营销活动设置。

SendGrid

使用 API 密钥连接您的 SendGrid 帐户。Flash 通过 v3 邮件 API 发送邮件。

Amazon SES(您的账户)

带上您自己的 AWS SES 账户(访问密钥/区域/验证来源)。与平台的后备 SES 不同。

定制 REST — 任何 ESP

将 Flash 指向任何提供商的 JSON 发送 API,并附带字段映射。无需等待适配器。

原始 SMTP 中继已在路线图上,但尚未可用 - 目前通过提供商的 API 连接。

备用瀑布流

每次发送都会按照您设置的优先顺序尝试您的提供商;失败或不可用的提供商将被跳过,交付将转至下一个。该平台的托管电子邮件服务始终是终端后备。

// Providers are tried in the priority order an admin sets. The list ALWAYS ends at
// the platform's managed Amazon SES account (the terminal fallback), which uses its
// own verified from-address so a fallback never bounces on an unverified domain.
Priority 1  →  SendGrid            (your account)
Priority 2  →  Amazon SES          (your own AWS account)
Priority 3  →  Custom REST         (any ESP with a send API)
Terminal    →  Platform Amazon SES (always on — the safety net)
// A provider that errors or is circuit-broken is skipped; delivery falls to the next.

将任何 ESP 与自定义 REST 连接

如果您的提供商未内置,请通过其发送 API 连接它——提供端点、身份验证标头和字段映射。无需编写代码,也无需构建适配器。

// A "Custom REST" provider connects ANY ESP that exposes a JSON send API — no
// code, just configuration. An admin supplies the endpoint, the auth header, and a
// field map; Flash builds the request per message. Example (a generic ESP):
{
  "provider": "custom_rest",
  "config": {
    "endpoint":    "https://api.your-esp.com/v1/send",
    "authHeader":  "Authorization",
    "authScheme":  "Bearer",              // → "Authorization: Bearer <apiKey>"
    "toField":     "to",
    "fromField":   "from",
    "subjectField":"subject",
    "htmlField":   "html"
  },
  "secret": { "apiKey": "sk_live_…" }      // encrypted at rest; never returned
}
// Per send, Flash POSTs: { "to": "...", "from": "...", "subject": "...", "html": "..." }
// with the auth header applied. 401/403 → credentials error (skip to next provider),
// 5xx/timeout → transient (skip to next provider). The HTML already carries Flash's
// own tracking pixel + link redirects, so opens/clicks keep working.

将退订用户同步回 Flash

当您通过自己的提供商发送时,选择退出可能会在 Flash 之外通过您的 ESP、您的偏好中心或表单捕获。使用取消订阅API将它们推回,这样Flash就会在每次发送时抑制该地址。您还可以读取地址的选择退出状态。使用租户 API 密钥进行身份验证;电子邮件是身份。

// Push an opt-out INTO Flash — from your ESP's unsubscribe webhook, your own
// preference center, or a third-party form. Flash then suppresses this address on
// EVERY campaign send (the same signal the audience resolver checks). Idempotent.
POST https://flash.socialhub.ai/api/v2/members/unsubscribe
Authorization: Bearer fl_live_…            // scope: members:write
Content-Type: application/json
{ "email": "ada@acme.com" }
// → 200  { "data": { "email": "ada@acme.com", "unsubscribed": true } }

// Read an address's opt-out status (e.g. reconcile before a bulk send):
GET https://flash.socialhub.ai/api/v2/members/unsubscribe?email=ada@acme.com
Authorization: Bearer fl_live_…            // scope: members:read
// → 200  { "data": { "email": "ada@acme.com", "unsubscribed": true } }

// Re-subscribing is deliberately NOT an API toggle — re-granting marketing consent
// needs provable opt-in (CAN-SPAM / CASL), so it goes through the member's own
// consent flow, never this endpoint.

如何保证凭证的安全

静态时加密

每个提供商密钥都会立即加密(AES-256-GCM),并且 API 永远不会返回或再次显示——用户界面仅可写入。

仅限管理员

只有组织所有者/管理员可以添加、重新排序、测试或删除提供商。营销人员永远不会看到或选择提供商。

仅限交通运输

供应商传递信息; Flash 仍然拥有追踪、个性化、A/B 测试、退订标头和频次上限等功能——更换服务提供商,无需更改任何内容。

默认安全

如果无法读取提供商的配置,或者每个提供商都失败,则发送将回退到平台的托管电子邮件服务 - 发送永远不会停止。

另请参阅:跨渠道交付 · REST API

自带电子邮件提供商?

与工程师讨论您的电子邮件服务提供商 (ESP)、送达率、备用策略或通过其 API 连接提供商。

与工程交谈