Hi guys,
I need a tip or suggestion:
I would like to place some kind of token (e.g. a GUID) in an email which I will get back when the receiver replies to my email.
The trivial approach is to put this token in the email text. The problem is that some users deleted it before they sent their reply
So, I was wondering if there is a best practice to somehow āhideā this token and still make sure that I will get it back.
I hope you can help me out.
Thanks
Ingmar
Hi Ingmar,
Hi Ingmar,
Hi Kashif,
too bad
Using the āsubjectā was one thought that I already had too. I guess I will go for it.
Thank you very much fĆ¼r your researches!!!
Ingmar
mailMsg.From = "Token 123 ";
mailMsg.To = "Receiver@gmail.com";
mailMsg.Subject = "Test Subject";
mailMsg.Body = "Test Body";
Hello Kashif,
I really appreciate that you didnāt give up researching. And your solution is very interesting.
Except, how do I get access to the Message-ID of the original email? I believe that Message-ID is assigned when I send the email, right? But at that point I have no access to it anymore. Or do I? Well, I will try a few things.
Thanks again!
Ingmar
Hi Ingmar,
I have done little more investigation and following are my findings:
- I sent mail from user01 to user02. Following is found in the SENT folder of user01
Message-ID: <**[510d4d6e.ed14b40a.68d8.2597@mx.google.com](mailto:510d4d6e.ed14b40a.68d8.2597@mx.google.com)**>
Date: Sat, 02 Feb 2013 09:31:26 -0800 (PST)
- user02 replies to this mail. Following is found in INBOX of user01.
In-Reply-To: <510d4d6e.ed14b40a.68d8.2597@mx.google.com>
References: <510d4d6e.ed14b40a.68d8.2597@mx.google.com>
Date: Sat, 2 Feb 2013 22:31:52 +0500
Message-ID:
- user01 again replies to this response and in return user02 replies second time. Following is found in INBOX of user01.
In-Reply-To:
References: <510d4d6e.ed14b40a.68d8.2597@mx.google.com>
Date: Sat, 2 Feb 2013 22:33:27 +0500
Message-ID:
Here we can see that a reference is always maintained in the consecutive replies since a mail is sent from the source. In the above example "510d4d6e.ed14b40a.68d8.2597@mx.google.com" is the unique reference which can be used to keep track of individual mail and respective conversation.
I have also observed that on receiver end (user02) same unique reference is maintained for all the mails under this conversation.
Please analyze the above information and let us know your feed back.
Good morning Kashif,
those are really great findings. And thank you so much for your effort.
The thing is - and I should have been more precise about this in my previous posting - I donāt think there are physical files being created (eml or something else ) when my application sends its emails. Or does it?
I am creating an email object in memory, and then just send it with the buit-in āDefault SMTP Virtual Serverā of my IIS6. I donāt know which āuserā is being used in this context. Maybe āNetwork Serviceā or āLocal Serviceā? I donāt know. In any case I could not find a āSentā folder for email. But maybe I was not looking at the right places.
But before even going into accessing a file after sending an email, it would be super nice if the email object of the original email had the newly created Message-ID stored in one of its properties - right after I send the email. This way I would not have to think of accessing the corresponding file (if there is one at all).
I understand that I only need the original Message-ID. From there on, whenever a receiver replies, I can just walk the list of references in order to figure out which emails belong together.
So, if you know an easier way to get the original Message-ID (other than accessing a file) - or maybe a way to set one on your own - this would be a perfect solution then.
Thanks again so much for your effort!
Ingmar
Hi Ingmar,
Hello Kashif,
since Iām not connecting to a real email account I donāt have persistent folders and files such as Inbox, Sent, etc.
But it is great that you found out about the whole Message-ID/References stuff. Maybe I will have use for this in another project.
So, thank you very much again for your help!