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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南