A better outline might be somehting like:
Dear Professor Smith,
I am planning to apply to Teleportation programme at the University of
Wonderland for my graduate studies. They require two reference
letters, and your area of interest is related to the programme I am
Would you please be kind enough to write a letter of recommendation?
I have taken your course Introduction to Supernatural Incidents (ISI
101) in 2016 - 2017 Fall semester, and you have noted that one of my
assignments were outstanding.
Keep in mind that if you suspect that the professor wouldn't even remember you, it is better not to ask that professor for a letter of recommendation, because chances are they are going to write a mediocre letter.
Why did I pick this outline
Because first of all, the reason for you writing a mail should be explained at the first sentence. An avarage professor mailbox receives around 100 mails per day. Thus, they decide whether or not to read the full mail in a few seconds.
The actual reason for such mail is your application for graduate studies, and you give solid reasons for the letter of recommendation. Note that in your outline, the letter of recommendation is just mentioned. It seems like you wanted to remind the professor that you were his student, and handed in a good essay.
Another reason is, the punctiation and language. Although overly-formal emails are not good, using a proper language helps.
To sum up, the professor wants to know three things very clearly, and as soon as possible:
- Why are you writing this mail?
- What do you want from me?
- Why would I grant your wish?