Q:

"An den Mann, den..." or "An dem Mann, den..." - Which one correct?

At the beginning of a letter on the Internet addressing someone, do we use accusative or dative?
Which one is correct?

An dem Mann, den...
  An den Mann, den...

A:

Many location-related prepositions go with the Dativ when a state/position is expressed, but with the Akkusativ when related to a direction or movement.
An is among them, in is also quite prominent. There is an interesting overview here (even although it is from an Austrian site!) (pdf).
So when you express where to (or to whom) the letter should be sent, it is an den (Akkusativ) for male recipients.

An dem Mann kommt mir etwas komisch vor.
Something about the man seems strange to me.

...would be a grammatically correct use of an + Dativ (although not necessarily the best way to express this, and not obviously location-related either.)
Further example:

Das Bild hängt an der Wand. (describing where it is)
Ich hänge das Bild an die Wand. (describing where I am putting it)

