I have already had this issue a few times. I just received an e-mail from a former student of an undergraduate course, asking for a letter of recommendation to apply for graduate studies. This course took place almost 5 years ago. I don't think I had any contact with the student after the course, although it's hard to say: I can't remember the student, and I don't even work at the same university anymore, so I don't even have access to grades, etc. He sent me his transcripts but can I write a letter only with that?
What do people do in this cases? Write a standard letter quoting some of the grades (from the transcript)? How can that be useful to anyone?