Ok, I know this isn't technically a music theory site, but I figured someone would be able to help me out here. I'm trying to analyze of a piece of music and there's a Major chord not in the key (d minor, and the chord is E major), it does not resolve to an A chord, so it can't be a secondary dominant. Instead it goes to a c# fully diminshed seventh chord (which is a C.T. chord in this key).
What are some other major chords that function in keys they're not necessarily part of? (Examples would be secondary dominants, Neapolitan sixths...those are the only two I know).