tags:

views:

35

answers:

4

Hi All,

I am trying to embed an ID into an email so that when a recipient replies to an email that my system sends out, my system can pick it up and match the two together.

I have tried appending a custom header, however this is stripped out when the user replies.

I have tried embedding an HTML comment within the email, but outlook does not seem to keep comments when a reply email is created.

Worst case scenario, I can manually try and match the sent and received emails by time span or have a visible tag within the message body.

Does anyone know of a more elegant solution?

Thanks in advance

A: 

If your incoming e-mail can handle +foo or -foo suffixes, use that.

Many e-mail systems can route [email protected] or [email protected] to [email protected]. You can replace foo with some kind of identifier.

Several mailing list servers use this for tracking bounces.

Lars Wirzenius
I have just tried on exchange and lavabit.com, nether seem to support that! Thanks for the suggestion though.
David Kiff
A: 

While I can't say for certain, my investigation in that sort of matter some time ago yielded the following "conclusion":

  1. Headers are transformed a lot
  2. Message bodies are transformed a lot

This is partly because, I suspect, of:

  1. Need to protect users from malicious intentions
  2. Need to perform "targeted marketing"

I have seen "unique codes" flying around in clear text in the email body but I would suggest having a unique identifier embedded in the return address instead.

jldupont
A: 

The usual approach is to place the id in the subject line and/or somewhere visible in the message text and informing the recipient that he should not modify the subject or quote the original mail when responding.

jarnbjo
I have already suggested that in my question!
David Kiff
And I responded that that is how it's usually done.
jarnbjo
+3  A: 

Email messages already contain such an identifiers, called Message-ID. And there's even a way to send which message you're replying to by sending that ID in a header called In-Reply-To. That's done by pretty much all email clients, that's how they usually do their threading.

It's defined in RFC 822 (yep that's pretty old) and probably re-defined and refined in more modern versions of that.

Joachim Sauer
Perfect, works like a charm! I would never have found that!
David Kiff