I took a course with my supervisor this semester. the class is finished. I really enjoyed every moment in class. I could ask all of my questions very easily and he always was available to answer them. it was an interactive class. The final exam is not taken yet. I wanted to write a thank you letter to my professor and thanking him for the course. I was wondering if you could tell me when is the appropriate time to send him an email. and what should I say to him in my email?
I agree with OBu's answer (and gave it +1) that what you've written is perfect, exactly the kind of note any instructor would love to receive from a student. But hold off until you have your final grade. You'll make his day. If you'd really like to hit a home run with your instructor, consider also posting it to RateMyProfessors.com.
The timing depends on the relationship you already have. In most cases it would be best to wait until after the course is completed and graded. You don't want to be perceived incorrectly as trying to influence the grades. But if the relationship is longstanding, then the timing matters less. I've had professors that I could thank at any time without misunderstanding, and others, somewhat more formal, for whom it would be better to wait.
But writing is a good thing to do. So is coming back to the university ten years later and thanking some of your professors who especially helped you and bring them up to date on your professional progress.