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

Email Message

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

email message delivery tracking

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;
}

屬性

屬性型別說明
idstring帶有 eml_ 前綴的 KSUID
account_idstring擁有此郵件的帳戶
hostnamestring寄送所使用網域
directionenumin 為收件、out 為寄件
from_contactobject寄件者資訊
reply_to_contactsarrayReply-to 聯絡人
to_contactsarray主要收件者
cc_contactsarray副本收件者
bcc_contactsarray密件副本收件者
subjectstring郵件主旨
body_textstring純文字內容
body_htmlstringHTML 內容
received_atstring?收到 inbound 郵件的時間
sent_atstring?送出 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"
}

相關