views:

204

answers:

4

Am trying to determine the best way to persist information from an originating email, through to a reply back.

Essentially, it is to pass a GUID from the original email (c#), whereby when the receiver replies back, that GUID is also sent back for reference.

I have tried setting the MessageID, whereby using Outlook, the In-Reply-To value is set with the original ID, however using some webclient email systems, that value is not created on reply. Is there another way to sent this info through email headers?

+1  A: 

I don't think you'll be able to do anything that is perfectly reliable by headers alone -- the number of clients that would have to cooperate is immense.

Most systems that do this work by including something in the body of the email that is sent that allows it to identify the message, and including text instructing the recipient to include that block of text in the response. You could also try including it in the subject (and including text in the body to leave the subject unchanged). That's how some mailing list managers I've seen do it.

Jonathan
I agree-- if tracking is essential, don't rely on headers. Stick your GUID everywhere(headers, subject, body, signature), and then run a search on the responding email to look for it anywhere in the entire message. You may want to generate a system that you can easily identify with regex, such as letter-number-number-letter-... A GUID may be too universal.
Kekoa
A: 

The most reliable way is to put the ID in the subject, which should be preserved throughout replies.

(It doesn't hurt to tell your users that they should keep the subject intact.)

RT, a popular ticketing system, does this. They use a simple subject format like "[Ticket #123]" and key off of 123.

a paid nerd
+3  A: 

Some variation on VERP is probably the most reliable...

http://en.wikipedia.org/wiki/Variable_envelope_return_path

Specifically, instead of having all your replies coming to the same address, encode the information you want to persist into the From address for the email.

For example, in the case of a helpdesk ticket, you could use something like:

From: Helpdesk <[email protected]>
To: End User <[email protected]>
Subject: Ticket #123 - problem with computer.

That way, regardless of what the user edits in the subject or text, you know what ticket is being referred to by the receiving email address.

Stobor
Yes, or a variation of setting the reply-to email address which sets the id.
mickyjtwin
A: 

I stumbled upon this question, and it's been very informative. This, however, leaves me with one question: Will using VERP, or a variation of editing the 'reply-to' or 'from address', cause the messages to be locked up in spam filters?

I have read that spam senders often change the bounce address to prevent their servers from getting clogged with bad email address bounces. Is it a spam risk to assume this approach?

Albert Bori
I don't think so, as the email will always be coming from the site domain. For example, any support questions come from [email protected], and a verp request would come from [email protected]
mickyjtwin