Wow, I wonder how. Presumably they could have encoded a watermark into the text by changing out synonyms. All you'd need is 15 words with two possible synonyms.
...Or, more simply, they probably used packet sniffing/similar?
In that case, that person wasn't very careful. One easy way to identify people would be to fingerprint each email by permuting words and sentences here and there. You don't need that many to make each email unique. That would actually seem very Google-esque to do that :)
But I'd be curious to know if there is a simpler version: sniffed traffic, browser history, Sent folder...