Set headers when sending emails with Cognito

0

How can I set specific email headers when sending emails through cognito custom emails system? More precisely I'd like to set the 'X-Entity-Ref-ID' header to avoir threading in recipient inboxes.

CustomMessage lambdas has no header method in the response json CustomEmailSender could work but feels overkill.

Thanks

  • This is not implemented in the triggers unfortunately.

2 回答
1

With Amazon Cognito, Custom message Lambda trigger, you can only set the following:

  • "smsMessage": "string",
  • "emailMessage": "string",
  • "emailSubject": "string"

You cannot set the email headers as of now. However using a different subject line may allow you to not group emails from being shown as a threads without using "X-Entity-Ref-ID".

AWS
专家
Parnab
已回答 2 年前
0
已接受的回答

So the only solution to this problem is to use a CustomEmailSender and add the header in that lambda. A lot more code to write to access SES but more control. A shame, access to settings headers on emails would simplify all this.

已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则