Sending email from and in-house tool, and threading conversations (Exchange) RRS feed

  • Question

  • We have an in-house tool that sends email, but does not receive it. We have a need, for the receivers of these emails, to group all of the related ones, into a single thread or conversation in exchange/outlook. 

    In the past, the tool would keep conversations on the same topic grouped by matching the subject line, with possibly an "RE:" prefix. So, outlook would group all of the messages with the same subject line (with the possible exception of "RE") into the same thread. 

    I was part of the trial run to move my domain account to O365. After IT moved me over, the emails from our tool no longer get grouped as being part of the same conversation. This is not an issue for people that have not migrated over yet. I am trying to fix this before they are. 

    I have looked into, and experimented with "Thread-Topic", "Thread-Index", "References", "In-Reply-To", and "Message-ID" fields with limited success. I have a little test program that will sometimes work. But, only sometimes. 

    It is important to note that the tool we have currently does not receive email. So, I tried faking out the "Message-ID" field with my own fake value, then using that same value in the "In-Reply-To" field. Again, this works occasionally in my test program. But, does not work ever using our tool. The behavior is inconsistent.  

    What is the *right way* to do this?

    I've googled around and most of the stuff I have found was old and not very helpful, or did not consistently work. 

    • Edited by Mindfunk Wednesday, May 2, 2018 4:31 PM
    Tuesday, May 1, 2018 10:39 PM


  • I found a solution that seems to work. 

    When I generate the first email, which is the beginning of the thread, I use a completely made up, but unique  number (think GUID) and set the "Message-ID" field.

    m.Headers.Add("Message-ID", "<>");

    The tool saves this value for follow up emails. Follow up emails are sent with these in the header:

    m.Headers.Add("In-Reply-To", "<>");

    I've played around with "thread-topic" and "thread-index", both with and without the settings above. But, this is what seems to work consistently. 

    I still would like to know what the correct way to do this, because this is a hack. 

    • Marked as answer by Mindfunk Tuesday, May 22, 2018 6:26 PM
    Thursday, May 3, 2018 9:33 PM