Dear Joe,
I was sorry to learn that you had not been successful in the examination. Although I’m sending you my sympathy, I feel you ought not to be unduly distressed at the result. You are still eligible to sit again for the examination and I am confident that this time next year, I shall be sending a letter, not of sympathy, but of congratulation.
My kindest regards and best wishes.
Sincerely Yours,
Luke