Write the words that you would like to say to him in person. Once you have those words, you have a draft of your letter. Post it here and people can take a look. We can't write the letter for you, because we don't know what it is he did and what you want to say thank you for.