AM
JA
無料で始める
メニュー

Email Message

システム経由で送受信されたメールの記録(配信追跡付き)。

email メール message メッセージ delivery 配信 tracking 追跡

Email Message

Email Message は、AM のメール基盤を通じて送受信されたメールの記録です。

スキーマ

interface EmailMessage {
  id: string; // "eml_..." - 一意識別子
  account_id: string; // 所有アカウント
  hostname: string; // 送信ドメイン
  direction: "in" | "out"; // 受信または送信
  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;
}

プロパティ

PropertyTypeDescription
idstringeml_ プレフィックス付き KSUID
account_idstringこのメッセージを所有する Account
hostnamestring送信に使われたドメイン
directionenumin は受信、out は送信
from_contactobject送信者情報
reply_to_contactsarrayReply-To 連絡先
to_contactsarray主宛先
cc_contactsarrayCC 宛先
bcc_contactsarrayBCC 宛先
subjectstringメール件名
body_textstringプレーンテキスト本文
body_htmlstringHTML 本文
received_atstring?受信メールを受け取った時刻
sent_atstring?送信メールを送信した時刻

{
  "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"
}

関連