Dear {Employer/Colleague/Staff},
I want to express my sincere gratitude to you for making my stay at {company} so happy and productive. It has been a pleasure working with you for the last {number of} years, and I will certainly miss all the wonderful times we shared.
Thank you also for the retirement party and the lovely {gift} you got me. How did you know I needed a {gift}? It's perfect for when I go on vacation to {location} next {week/month} with my {wife/spouse}.
Though we won't be seeing each other on a daily basis anymore, I hope we'll still keep in touch outside of the office. In case you don't have it, my personal {email address/cell number} is {contact information}.
Warm regards,
{Your Name}