A really cool feature of Gmail is how it automatically threads email messages so that they appear as a single item rather than multiple items in your email list. This helps keep your inbox organized, especially if you have really long email threads.

Here is how Gmail decide which messages should and shouldn’t be part of a thread/conversation:

  1. The subject must be similar: The subjects do not have to be exactly the same, but they must contain a pre-approved prefix (e.g. test and re: test will be in the same thread). Here are some of the valid ones: RE:, R:, and FWD:. If you modify the subject in any other way, it will start a new thread (e.g. if you modify test to test 123).
  2. The sender must be a part of the thread OR in-reply-to must be used: The sender of the email message must be a part of the thread, or otherwise, it will start a new thread. The one exception is if the in-reply-to header is supplied. You can get the in-reply-to header by replying to the original email through Gmail. For example, let’s say you have a@example.com forward messages to b@example.com. Now let’s say user@example.com sends you an email to a@example.com. The message will also be delivered to b@example.com. If you use the reply form in your email client (e.g. Gmail) from the b@example.com, it will most likely automatically add the in-reply-to header for you. This way even though b@example.com was never a part of the thread that exists on user@example.com, it still goes into the same thread.
  3. Sender and receiver might see different threading: Note that if you send email messages from Gmail they will also be threaded. The rules are exactly the same as when you receive them, except for one minor detail. If you send the same exact message twice with no subject prefix (e.g. subject is test not re: test) it does get threaded on the receiving end, but not on sending end. Conversely, if it does contain a prefix (e.g. re: test) it will be threaded in both cases.
  4. Max of 100 messages: There’s a maximum of 100 messages per thread/conversation.