You are Peter/Mary. Write a "Thank you" letter to Mr. Smith for his help in getting you a job in XYZ Company.
Dear Mr Smith, I'm sure the reference you gave me made all the difference for me in getting the position with the XYZ Company. Your advice and help in preparing for the interview was also invaluable because, it gave me a level of confidence that I hadn't felt at other interviews. I will do my very best to live up to the qualities you expressed in the reference and I am positive, you and the Company will be pleased with my efforts. My thanks and regards, Peter