How to track emails sent via AWS SES using a custom message id in the email header

I am sending emails from Auth0 using management api and AWS SES is the email provider configured.
I receive SNS notification for the email sent, but I cannot associate the it to the original message send request since there is no linking information available, ie, Auth0 does not provide any email related info like message id in its logs.

Is it possible for me to add any custom header in the email template before I trigger the management api call to send email.

Hi @ jeena.kurian,

Welcome to the Community

You can perform any type of customization in email or even you can design your own email template too. You can below prior post for this also:
Custom Email template for differant applications

Thanks Rashid for the reply.
But I was looking for a way to set message headers in the Email object which is sent from Auth0 to the provider. So that I can read the original email headers when the bounce, complaint, and delivery notifications are provided through Amazon SNS.

I wouldn’t use the custom headers if I initially get any response from Auth0 once an email is sent. Once an email is sent, the email provider (SES) sends back a 250 Ok Response with a “MessageID” in it. If by any mean I can get hold of this MessageID, then it would serve my purpose.

Can anyone help me.

1 Like

Hi, this would be helpful as well to know. Can we set a custom email header?
This is different from setting the email template.

1 Like

Hi guys, I was looking for the same thing and found this hidden gem - you might be able to add a header using the management API to patch the email provider settings: https://auth0.com/docs/api/management/v2#!/Emails/patch_provider

1 Like

Thanks for sharing that with the rest of community!