views:

298

answers:

1

Gmail automatically greys text that looks like a signature. Anyone have any guesses how it does this? (I've noticed that it depends on the presence of the sender's name, but I think that's only part of the story).

I ask because I'm working on a web application that has an email interface, and I'd like to remove users' signatures before displaying the contents of their emails.

+6  A: 

Email signatures are supposed to be started with two dashes, a space, and a newline. See the SIGNATUR FAQ and Wikipedia

Paul Tomblin
Yeah, but people don't always follow these criteria (and Gmail recognizes signatures that don't).
Horace Loeb
And the trailing blank is annoying - it is one of the few places where a trailing blank is significant (and they should never be, at least, not in my ideal - but horribly non-existent - world).
Jonathan Leffler
The trailing blank is there to distinguish between things added by the user (where trailing blanks can and should be removed) and things added by the program (where they shouldn't be removed).
Paul Tomblin
I can't remember ever having seen a signature that follows those rules, so clearly Gmail's algorithm must be a heck of a lot smarter than that. This question is old, but the suggested answer is older still...
Oskar Austegard