AM
ZH-CN
免费开始
菜单
类型

邮件消息事件

用于追踪邮件消息生命周期中投递状态变化的事件记录。

email events delivery tracking status

邮件消息事件

Email Message Event 记录某封邮件的投递状态变化,帮助你观察完整邮件生命周期。

Schema

interface EmailMessageEvent {
  id: string; // "eme_..." - Unique identifier
  account_id: string; // Owning account
  email_message_id: string; // Associated message
  event_type: string; // Event type
  meta: Record<string, any> | null; // Additional data
  occurred_at: string; // ISO 8601 timestamp
}

属性

属性类型说明
idstringeme_ 前缀的 KSUID
account_idstring所属账户上下文
email_message_idstring关联的邮件消息 ID
event_typestring事件类型
metaobject?事件特定元数据
occurred_atstring事件发生时间

事件类型

事件类型由服务商定义,常见值包括:

类型说明
queued消息已接受,等待投递
sent已交给接收方 MTA
delivered已确认送达收件箱
bounced永久投递失败
soft_bounced临时投递失败
complained收件人标记为垃圾邮件
opened收件人已打开邮件
clicked收件人已点击链接

事件流

重试最大重试次数queuedsentdeliveredbouncedsoft_bouncedopenedclicked

示例

{
  "id": "eme_2kHfPZcN9xW4mE8RtY7vB",
  "account_id": "acc_1jGePYbM8wV3lD7QsX6uA",
  "email_message_id": "eml_3lIfQZdO0yX5nF9SuY8wC",
  "event_type": "delivered",
  "meta": {
    "recipient": "user@example.com",
    "smtp_response": "250 OK"
  },
  "occurred_at": "2025-01-15T10:30:45Z"
}

相关