AM
ZH-TW
免費開始
選單
類型

Email Message Event

追蹤郵件生命週期的投遞狀態事件。

emaileventsdeliverytrackingstatus

Email Message Event

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
}

屬性

屬性 型別 說明
id string 帶有 eme_ 前綴的 KSUID
account_id string 帳戶上下文
email_message_id string 此事件對應的郵件
event_type string 事件類型
meta object? 事件特定中繼資料
occurred_at string 事件發生時間

事件類型

事件類型依 provider 而定,常見值包括:

Type 說明
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"
}

相關