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 Answers
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
EXPERT
Parnab
answered 2 years ago
0
Accepted Answer

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.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions