At the end of the school year, teachers can use goodbye letters similar to this to bid farewell to students.
Dear Students,
As the school year comes to a close, I just want to let you know that it has been a pleasure being able to instruct you over the last {quarter, semester, year, etc.}. Students are what makes this job worth it for a teacher, so thank you.
I see a lot of students, but each {quarter, semester, year, etc.} a class does at least one thing that makes it stand out in my mind. This year, we had {something memorable from the class}, and {another memorable event}. I hope you learned from those experiences, and also had a good time along the way.
Good luck with your future {studies, career, etc.}. Please keep in touch, and feel free to contact me if you ever need any help, information, or even letters of recommendation.
Sincerely,
{Sender}