Retrieving Amazon SES Event Data - retrieve custom data from bounce event

三世轮回 提交于 2019-12-11 14:31:32

问题


When I get the bounce event in the SNS I want to retrieve extra data regarding this email. I only have the messageID.

Is there a way to add custom header to SendEmail API?

Is there another way to retrieve custom data of specific email? I dont want to write to DB because it causes me performance issues when writing to DB whenever I send an email. I send millions email per day.

Thanks!


回答1:


Using the bounce object, you already have access to the bounce type, bounce subtype, bounced recipients and timestamp data.

However, if you need more fine-grained detailed monitoring for the bounce event using Amazon CloudWatch or Amazon Kinesis Firehose, you can apply one or more message tags (as an array) to the emails you send. See Monitoring Using Event Publishing.




回答2:


You could set Tags within your sendEmail request.

In case of a Bounce you are getting the tags back

{
    "eventType": "Bounce",
    "bounce": {
        "bounceType": "Permanent",
        [...]
    },
    "mail": {
        [...]
        "tags": {
            "ExampleTagName": ["ExampleTagValue"]
        }
    }
}


来源:https://stackoverflow.com/questions/44879352/retrieving-amazon-ses-event-data-retrieve-custom-data-from-bounce-event

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!