+0
Thanks to whom ever send this gift!
+0

Thanks to whoever sent the letter.

  1. You are confused because the pronoun follows a preposition, so it should be in the object form. But the verb "sent" needs a subject, which cannot be "whom." That is the point. "Whoever sent the letter" is a clause, a noun clause, and the entire clause is the object of "to." Additionally, consider it this way: a subject is more important than the object of a preposition. That's actually easier for a lot of people to use as a guide in these situations. But the real reason is that "whoever sent the letter" is a noun clause, the object of "to."