AM
TH
เริ่มต้นฟรี
เมนู
ประเภท

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

คุณสมบัติ

PropertyTypeคำอธิบาย
idstringKSUID ที่ขึ้นต้นด้วย eml_
account_idstringบัญชีที่เป็นเจ้าของข้อความ
hostnamestringโดเมนที่ใช้ส่ง
directionenumin สำหรับรับเข้า, out สำหรับส่งออก
from_contactobjectข้อมูลผู้ส่ง
reply_to_contactsarrayรายชื่อผู้รับสำหรับตอบกลับ
to_contactsarrayผู้รับหลัก
cc_contactsarrayผู้รับสำเนา (CC)
bcc_contactsarrayผู้รับสำเนาลับ (BCC)
subjectstringหัวเรื่องอีเมล
body_textstringเนื้อหาแบบข้อความล้วน
body_htmlstringเนื้อหาแบบ HTML
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"
}

ที่เกี่ยวข้อง

  • Email Message Event - การติดตามการส่ง
  • Email Template - เทมเพลตที่ใช้ซ้ำ
  • Email - โครงสร้างพื้นฐานอีเมล