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.
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!!!
mailMsg.From = "Token 123 ";
mailMsg.To = "Receiver@gmail.com";
mailMsg.Subject = "Test Subject";
mailMsg.Body = "Test Body";
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.
Date: Sat, 2 Feb 2013 22:31:52 +0500
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!
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!