I have been working on email client that will with with Gmail and Outlook 365. When you send an email you can put it in a "Project". The purpose being to say "show me all emails related to this project". Ideally all emails in the subsequent chain would be put into that "Project" too.
So I am trying to find the best way to do this. For sure I could put a tag in the subject (as is common is tracking tickets in a support ticket system) but would rather not since it looks kind of ugly.
I could also put a
<span style="display:none" id='ProjectTrackingCookie"> ProjectTrancingGuid </span>
This is not ideal either since it would have to decode every email to do a search for that text.
I was wondering if there is a way to do this with something in the email header, some sort of category that is copied forward from one email to the next? Or perhaps keep track of the emailIds and replyIds in a database?
I am aware that spam companies do this (this is an application for helping manage emails in corporate setting so nothing to do with spam), but am also aware that gmail and outlook are pretty aggressive about stripping that sort of thing.
Any suggestions for the best way to approach this?
Ideally I'd be able to do a search on the api for something like "all emails with project code aabbccdd" and have the search take place on the gmail server side.