本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
Amazon SES 的 Amazon SNS 通知範例
以下章節提供三種類型的通知範例:
-
如需退信通知範例,請參閱 Amazon SNS 退信通知範例。
-
如需投訴通知範例,請參閱 Amazon SNS 投訴通知範例。
-
如需傳遞通知範例,請參閱 Amazon SNS 遞送通知範例。
Amazon SNS 退信通知範例
本節包含退信通知中顯示或不顯示傳遞狀態通知 (DSN) 的兩種範例,DSN 由送出意見回饋的電子郵件接收工具所提供。
顯示 DSN 的退信通知
以下為顯示 DSN 與原始電子郵件標題的退信通知範例。未將退信通知設定為包含原始電子郵件標題時,通知內的 mail
物件不會包含 headersTruncated
、headers
與 commonHeaders
欄位。
{ "notificationType":"Bounce", "bounce":{ "bounceType":"Permanent", "reportingMTA":"dns; email.example.com", "bouncedRecipients":[ { "emailAddress":"jane@example.com", "status":"5.1.1", "action":"failed", "diagnosticCode":"smtp; 550 5.1.1 <jane@example.com>... User" } ], "bounceSubType":"General", "timestamp":"2016-01-27T14:59:38.237Z", "feedbackId":"00000138111222aa-33322211-cccc-cccc-cccc-ddddaaaa068a-000000", "remoteMtaIp":"127.0.2.0" }, "mail":{ "timestamp":"2016-01-27T14:59:38.237Z", "source":"john@example.com", "sourceArn": "arn:aws:ses:us-east-1:888888888888:identity/example.com", "sourceIp": "127.0.3.0", "sendingAccountId":"123456789012", "callerIdentity": "IAM_user_or_role_name", "messageId":"00000138111222aa-33322211-cccc-cccc-cccc-ddddaaaa0680-000000", "destination":[ "jane@example.com", "mary@example.com", "richard@example.com"], "headersTruncated":false, "headers":[ { "name":"From", "value":"\"John Doe\" <john@example.com>" }, { "name":"To", "value":"\"Jane Doe\" <jane@example.com>, \"Mary Doe\" <mary@example.com>, \"Richard Doe\" <richard@example.com>" }, { "name":"Message-ID", "value":"custom-message-ID" }, { "name":"Subject", "value":"Hello" }, { "name":"Content-Type", "value":"text/plain; charset=\"UTF-8\"" }, { "name":"Content-Transfer-Encoding", "value":"base64" }, { "name":"Date", "value":"Wed, 27 Jan 2016 14:05:45 +0000" } ], "commonHeaders":{ "from":[ "John Doe <john@example.com>" ], "date":"Wed, 27 Jan 2016 14:05:45 +0000", "to":[ "Jane Doe <jane@example.com>, Mary Doe <mary@example.com>, Richard Doe <richard@example.com>" ], "messageId":"custom-message-ID", "subject":"Hello" } } }
不顯示 DSN 的退信通知
以下為顯示原始電子郵件標題但不包含 DSN 的退信通知範例。未將退信通知設定為包含原始電子郵件標題時,通知內的 mail
物件不會包含 headersTruncated
、headers
與 commonHeaders
欄位。
{ "notificationType":"Bounce", "bounce":{ "bounceType":"Permanent", "bounceSubType": "General", "bouncedRecipients":[ { "emailAddress":"jane@example.com" }, { "emailAddress":"richard@example.com" } ], "timestamp":"2016-01-27T14:59:38.237Z", "feedbackId":"00000137860315fd-869464a4-8680-4114-98d3-716fe35851f9-000000", "remoteMtaIp":"127.0.2.0" }, "mail":{ "timestamp":"2016-01-27T14:59:38.237Z", "messageId":"00000137860315fd-34208509-5b74-41f3-95c5-22c1edc3c924-000000", "source":"john@example.com", "sourceArn": "arn:aws:ses:us-east-1:888888888888:identity/example.com", "sourceIp": "127.0.3.0", "sendingAccountId":"123456789012", "callerIdentity": "IAM_user_or_role_name", "destination":[ "jane@example.com", "mary@example.com", "richard@example.com" ], "headersTruncated":false, "headers":[ { "name":"From", "value":"\"John Doe\" <john@example.com>" }, { "name":"To", "value":"\"Jane Doe\" <jane@example.com>, \"Mary Doe\" <mary@example.com>, \"Richard Doe\" <richard@example.com>" }, { "name":"Message-ID", "value":"custom-message-ID" }, { "name":"Subject", "value":"Hello" }, { "name":"Content-Type", "value":"text/plain; charset=\"UTF-8\"" }, { "name":"Content-Transfer-Encoding", "value":"base64" }, { "name":"Date", "value":"Wed, 27 Jan 2016 14:05:45 +0000" } ], "commonHeaders":{ "from":[ "John Doe <john@example.com>" ], "date":"Wed, 27 Jan 2016 14:05:45 +0000", "to":[ "Jane Doe <jane@example.com>, Mary Doe <mary@example.com>, Richard Doe <richard@example.com>" ], "messageId":"custom-message-ID", "subject":"Hello" } } }
Amazon SNS 投訴通知範例
本節包含投訴通知中包含或不包含意見回饋報告的兩種範例,意見回饋報告由送出意見回饋的電子郵件接收工具所提供。
含有意見回饋報告的投訴通知
以下為含有意見回饋報告與原始電子郵件標題的投訴通知範例。未將投訴通知設定為包含原始電子郵件標題時,通知內的 mail
物件不會包含 headersTruncated
、headers
與 commonHeaders
欄位。
{ "notificationType":"Complaint", "complaint":{ "userAgent":"AnyCompany Feedback Loop (V0.01)", "complainedRecipients":[ { "emailAddress":"richard@example.com" } ], "complaintFeedbackType":"abuse", "arrivalDate":"2016-01-27T14:59:38.237Z", "timestamp":"2016-01-27T14:59:38.237Z", "feedbackId":"000001378603177f-18c07c78-fa81-4a58-9dd1-fedc3cb8f49a-000000" }, "mail":{ "timestamp":"2016-01-27T14:59:38.237Z", "messageId":"000001378603177f-7a5433e7-8edb-42ae-af10-f0181f34d6ee-000000", "source":"john@example.com", "sourceArn": "arn:aws:ses:us-east-1:888888888888:identity/example.com", "sourceIp": "127.0.3.0", "sendingAccountId":"123456789012", "callerIdentity": "IAM_user_or_role_name", "destination":[ "jane@example.com", "mary@example.com", "richard@example.com" ], "headersTruncated":false, "headers":[ { "name":"From", "value":"\"John Doe\" <john@example.com>" }, { "name":"To", "value":"\"Jane Doe\" <jane@example.com>, \"Mary Doe\" <mary@example.com>, \"Richard Doe\" <richard@example.com>" }, { "name":"Message-ID", "value":"custom-message-ID" }, { "name":"Subject", "value":"Hello" }, { "name":"Content-Type", "value":"text/plain; charset=\"UTF-8\"" }, { "name":"Content-Transfer-Encoding", "value":"base64" }, { "name":"Date", "value":"Wed, 27 Jan 2016 14:05:45 +0000" } ], "commonHeaders":{ "from":[ "John Doe <john@example.com>" ], "date":"Wed, 27 Jan 2016 14:05:45 +0000", "to":[ "Jane Doe <jane@example.com>, Mary Doe <mary@example.com>, Richard Doe <richard@example.com>" ], "messageId":"custom-message-ID", "subject":"Hello" } } }
不含有意見回饋報告的投訴通知
以下為顯示原始電子郵件標題但不包含意見回饋報告的投訴通知範例。未將投訴通知設定為包含原始電子郵件標題時,通知內的 mail
物件不會包含 headersTruncated
、headers
與 commonHeaders
欄位。
{ "notificationType":"Complaint", "complaint":{ "complainedRecipients":[ { "emailAddress":"richard@example.com" } ], "timestamp":"2016-01-27T14:59:38.237Z", "feedbackId":"0000013786031775-fea503bc-7497-49e1-881b-a0379bb037d3-000000" }, "mail":{ "timestamp":"2016-01-27T14:59:38.237Z", "messageId":"0000013786031775-163e3910-53eb-4c8e-a04a-f29debf88a84-000000", "source":"john@example.com", "sourceArn": "arn:aws:ses:us-east-1:888888888888:identity/example.com", "sourceIp": "127.0.3.0", "sendingAccountId":"123456789012", "callerIdentity": "IAM_user_or_role_name", "destination":[ "jane@example.com", "mary@example.com", "richard@example.com" ], "headersTruncated":false, "headers":[ { "name":"From", "value":"\"John Doe\" <john@example.com>" }, { "name":"To", "value":"\"Jane Doe\" <jane@example.com>, \"Mary Doe\" <mary@example.com>, \"Richard Doe\" <richard@example.com>" }, { "name":"Message-ID", "value":"custom-message-ID" }, { "name":"Subject", "value":"Hello" }, { "name":"Content-Type", "value":"text/plain; charset=\"UTF-8\"" }, { "name":"Content-Transfer-Encoding", "value":"base64" }, { "name":"Date", "value":"Wed, 27 Jan 2016 14:05:45 +0000" } ], "commonHeaders":{ "from":[ "John Doe <john@example.com>" ], "date":"Wed, 27 Jan 2016 14:05:45 +0000", "to":[ "Jane Doe <jane@example.com>, Mary Doe <mary@example.com>, Richard Doe <richard@example.com>" ], "messageId":"custom-message-ID", "subject":"Hello" } } }
Amazon SNS 遞送通知範例
以下為包含原始電子郵件標題的傳遞通知範例。未將傳遞通知設定為包含原始電子郵件標題時,通知內的 mail
物件不會包含 headersTruncated
、headers
與 commonHeaders
欄位。
{ "notificationType":"Delivery", "mail":{ "timestamp":"2016-01-27T14:59:38.237Z", "messageId":"0000014644fe5ef6-9a483358-9170-4cb4-a269-f5dcdf415321-000000", "source":"john@example.com", "sourceArn": "arn:aws:ses:us-east-1:888888888888:identity/example.com", "sourceIp": "127.0.3.0", "sendingAccountId":"123456789012", "callerIdentity": "IAM_user_or_role_name", "destination":[ "jane@example.com" ], "headersTruncated":false, "headers":[ { "name":"From", "value":"\"John Doe\" <john@example.com>" }, { "name":"To", "value":"\"Jane Doe\" <jane@example.com>" }, { "name":"Message-ID", "value":"custom-message-ID" }, { "name":"Subject", "value":"Hello" }, { "name":"Content-Type", "value":"text/plain; charset=\"UTF-8\"" }, { "name":"Content-Transfer-Encoding", "value":"base64" }, { "name":"Date", "value":"Wed, 27 Jan 2016 14:58:45 +0000" } ], "commonHeaders":{ "from":[ "John Doe <john@example.com>" ], "date":"Wed, 27 Jan 2016 14:58:45 +0000", "to":[ "Jane Doe <jane@example.com>" ], "messageId":"custom-message-ID", "subject":"Hello" } }, "delivery":{ "timestamp":"2016-01-27T14:59:38.237Z", "recipients":["jane@example.com"], "processingTimeMillis":546, "reportingMTA":"a8-70.smtp-out.amazonses.com", "smtpResponse":"250 ok: Message 64111812 accepted", "remoteMtaIp":"127.0.2.0" } }