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

Email Message

透過系統寄送或接收的郵件紀錄,含投遞追蹤資訊。

emailmessagedeliverytracking

Email Message

Email Message 是透過 AM 郵件基礎設施寄送或接收的郵件紀錄。

Schema

interface EmailMessage {
  id: string; // "eml_..." - Unique identifier
  account_id: string; // Owning account
  hostname: string; // Sending domain
  direction: "in" | "out"; // Inbound or outbound
  from_contact: EmailContact;
  reply_to_contacts: EmailContact[];
  to_contacts: EmailContact[];
  cc_contacts: EmailContact[];
  bcc_contacts: EmailContact[];
  subject: string;
  body_text: string;
  body_html: string;
  received_at: string | null;
  sent_at: string | null;
}

interface EmailContact {
  email: string;
  name?: string;
}

屬性

屬性 型別 說明
id string 帶有 eml_ 前綴的 KSUID
account_id string 擁有此郵件的帳戶
hostname string 寄送所使用網域
direction enum in 為收件、out 為寄件
from_contact object 寄件者資訊
reply_to_contacts array Reply-to 聯絡人
to_contacts array 主要收件者
cc_contacts array 副本收件者
bcc_contacts array 密件副本收件者
subject string 郵件主旨
body_text string 純文字內容
body_html string HTML 內容
received_at string? 收到 inbound 郵件的時間
sent_at string? 送出 outbound 郵件的時間

範例

{
  "id": "eml_2kHfPZcN9xW4mE8RtY7vB",
  "account_id": "acc_1jGePYbM8wV3lD7QsX6uA",
  "hostname": "mail.example.com",
  "direction": "out",
  "from_contact": {
    "email": "noreply@example.com",
    "name": "Acme Corp"
  },
  "reply_to_contacts": [],
  "to_contacts": [{ "email": "user@example.com", "name": "Jane Doe" }],
  "cc_contacts": [],
  "bcc_contacts": [],
  "subject": "Welcome to Acme",
  "body_text": "Welcome...",
  "body_html": "<h1>Welcome</h1>...",
  "sent_at": "2025-01-15T10:30:00Z"
}

相關