Name and address of candidate.
Date
Dear (Mr/Ms/Mrs/Miss Surname)
Thank you for attending the interview (or group selection event) with us on (date) at (location) for the position of (position).
While you presented yourself extremely well and impressed us very much, I regret that we are not on this occasion able to offer you the position, due to there being other better qualified (or more suitably qualified) candidates.
I thank you for the interest and enthusiasm you have shown and wish you all the best for the future.
Best wishes, etc