Share via


Azure 通訊服務 - 電子郵件事件

本文提供通訊服務電子郵件事件的屬性和結構描述。 如需事件結構描述的簡介,請參閱 Azure Event Grid 事件結構描述

事件類型

Azure 通訊服務會發出下列電話語音和 SMS 事件類型:

事件類型 描述
Microsoft.Communication.EmailDeliveryReportReceived 在收到通訊服務所傳送電子郵件的傳遞報表時發佈。
Microsoft.Communication.EmailEngagementTrackingReportReceived 在開啟所傳送電子郵件或按一下連結 (適用時) 時發佈。

事件回應

觸發事件時,事件方格服務會將該事件的相關資料傳送至訂閱端點。

本節包含每個事件的資料外觀範例。

Microsoft.Communication.EmailDeliveryReportReceived 事件

[{
  "id": "00000000-0000-0000-0000-000000000000",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/microsoft.communication/communicationservices/{communication-services-resource-name}",
  "subject": "sender/senderid@azure.com/message/00000000-0000-0000-0000-000000000000",
  "data": {
    "sender": "senderid@azure.com", 
    "recipient": "receiver@azure.com",
    "messageId": "00000000-0000-0000-0000-000000000000",
    "status": "Delivered",
    "deliveryStatusDetails": {
      "statusMessage": "Status Message"
    },
    "deliveryAttemptTimeStamp": "2020-09-18T00:22:20.2855749+00:00",
  },
  "eventType": "Microsoft.Communication.EmailDeliveryReportReceived",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2020-09-18T00:22:20.822Z"
}]

注意

Status 的可能值包括:

  • Delivered:訊息已成功移交給預定目的地 (收件者郵件傳輸代理程式)。
  • Suppressed:先前收件者的電子郵件已硬退件,因此會暫時隱藏傳送給此收件者的所有後續電子郵件。
  • Bounced:由於電子郵件地址不存在或網域無效,因此電子郵件可能已硬退件。
  • Quarantined:訊息已隔離 (垃圾郵件、大量郵件或網路釣魚)。
  • FilteredSpam:訊息已識別為垃圾郵件,並遭到拒絕或封鎖 (未隔離)。
  • Expanded:通訊群組收件者在傳遞至群組的個別成員之前已展開。
  • Failed:未傳遞訊息。

Microsoft.Communication.EmailEngagementTrackingReportReceived 事件

[{
  "id": "00000000-0000-0000-0000-000000000000",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/microsoft.communication/communicationservices/{communication-services-resource-name}",
  "subject": "sender/senderid@azure.com/message/00000000-0000-0000-0000-000000000000",
  "data": {
    "sender": "senderid@azure.com", 
    "messageId": "00000000-0000-0000-0000-000000000000",
    "userActionTimeStamp": "2022-09-06T22:34:52.1303595+00:00",
    "engagementContext": "",
    "userAgent": "",
    "engagementType": "view"
  },
  "eventType": "Microsoft.Communication.EmailEngagementTrackingReportReceived",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-09-06T22:34:52.688Z"
}]

注意

engagementType 的可能值為:ViewClickengagementTypeClick 時,engagementContext 是所傳送電子郵件中已按一下的連結。

教學課程

如需示範如何使用 Webhook 訂閱電子郵件事件的教學課程,請參閱快速入門:處理電子郵件事件