Email Threads

Email threading, also known as email conversations or email chains, is a method used to organize and present related email messages as a cohesive thread or conversation.

This feature is employed by email clients to simplify the management of ongoing discussions, making it easier for users to follow and understand the flow of communication.

Key email Headers

  1. In-Reply-To:
    • The In-Reply-To header contains the message ID of the parent email to which the current email is a reply. This header helps email clients link replies to the original message and maintain the thread.
  2. References:
    • The References header is similar to In-Reply-To and contains a list of message IDs that the current email is referencing. It helps in creating a complete chain of related messages in a thread.
  3. Subject:
    • The Subject header often includes "Re:" (meaning "reply") or other prefixes to indicate that the email is part of an ongoing thread. The subject line may evolve as the conversation progresses.
  4. Message-ID:
    • The Message-ID header uniquely identifies each email message. When you reply to an email, the new message typically includes the Message-ID of the original message in the In-Reply-To header.

In this guide, we'll demonstrate how to leverage MailerSend to effectively reply to inbound emails and create a threaded conversation. Learn how to set the appropriate headers for seamless communication.

What do I need?

  • MailerSend account
  • Generate an API token
  • Add and verify at least one sending domain
  • Add an inbound route with a webhook

Set up an inbound route on your verified domain

Let's take a moment to set up an inbound route in MailerSend, enabling your users to contact your Customer Support team for any technical challenges or general inquiries. This will streamline communication and ensure a seamless experience for your users.

Add Inbound Route

  • Begin by logging into your MailerSend account.
  • Head to the Email section and locate Domains.
  • Choose the relevant domain and click on Manage.
  • Scroll down to find Inbound Routing and click on Add an Inbound Route button.
  • Provide a name for your inbound route and specify the webhook URL where you want to receive inbound email data.

Send email to your Inbound address

Now that your inbound route is set up, users can easily contact your support team using the provided inbound address. In this guide, we'll demonstrate using Microsoft Outlook, but feel free to choose any email client you're comfortable with. Let's proceed!

Send email using outlook

  • Begin by logging into your preferred email client
  • Open a new email and address it to the provided inbound address.

Reply to the Inbound email

To reply to the email and initiate a threaded conversation, it's crucial to include either the Thread-Topic or Subject from the inbound email data, along with the Message-ID. This ensures that users can effortlessly follow the context of the conversation without the need to search through individual messages.

Inbound activity log

You can get this information from the inbound activity log or same data sent to your webhook.

  • Navigate to Domains on the left-side menu.
  • Select your domain and click on Manage
  • Scroll down to Inbound Routing and choose your inbound route.
  • On the inbound details page, expand the Forwarded activity log.
  • Search for and copy the Subject and Message-ID.

Now, let's use the MailerSend email API or any of the SDKs to seamlessly send the reply email.

MailerSend Email API

  • Ensure a smooth thread continuation by setting the in_reply_to header parameter to the received Message-ID
  • Keep the subject the same or consider prefixing it with Re: to signify a reply
  • Proceed to submit the request to send the reply email through MailerSend’s email API or SDKs.
  • Open your email client app and navigate to your inbox.
  • Locate the received email and click to view it. Observe how the thread is now seamlessly created, streamlining your communication.

Outlook Email

Congratulations!

You've successfully set up an inbound route and replied to an inbound email, creating a threaded conversation. This makes it easy for both users and our support team to track and follow conversations seamlessly.

What’s next?

To ensure a comprehensive chain of related messages in a thread, consider passing the References header using MailerSend API, SMTP or SDKs. This valuable piece of information can also be extracted directly from the inbound email data.

Inbound References

By including the References header, you contribute to the seamless flow of conversation within the email thread. This additional step enhances the context and organization of your email communication.

Feel free to explore this option to further optimize and enrich your threaded conversations in MailerSend. If you have any questions or need assistance, our support team is here to help!

You can find more info on how to manage your inbound route from our developer docsopen in new window

Last Updated: