Skip to main content
Email clients thread emails by using the message_id metadata. If you want to reply to an email, you should add the In-Reply-To header set to the message_id of the received email. We also recommend setting the subject to start with Re: so that email clients can group the replies together. Here’s an example of replying to an email in a Next.js application:
app/api/events/route.ts
If you’re replying multiple times within the same thread, make sure to also append the previous message_ids to the References header, separated by spaces. This helps email clients maintain the correct threading structure.