Unfortunately my Ph.D. supervisor died before I was able to tell him how profoundly his views and criticisms impacted my intellectual life. He was one of those hypercritical people for whom "it's okay" meant more or less the highest praise, both for himself and others. This made him a number of enemies, I believe, and for me, as a Ph.D. student, that attitude could be kind of demotivating at times. However, in retrospective I realized that many of his snippy remarks were spot on. For example, he once said on a rainy day in front of the blackboard: "So it seems to me that linguistics is very much like economics, not really a science, or at least fairly imprecise." Something along these lines. Then, I got really angry. Now I think he was right.
Anyway, I told his family after he died and I think they appreciated it.
Bottomline of this little anecdote is that if you want to tell someone how grateful you are, don't wait until you can meet in person and just write a nice email, like the OP suggests.