when and how can I write a thank you letter for my professor? 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?
The text you are writing here is perfect! It is personal, highlights the relevant aspects, and it is not overly enthusiastic.

I personally would send it after the exam was taken and graded.