I want to thank you for all you have done for me here at (Company). It's been a pleasure working with you, and representing the company as your (job title).
I have accepted an offer with another firm and have decided to tender my resignation as of today. This decision has nothing to do with the opportunity you have provided for me here. You and the company have been fair with me, and I genuinely appreciate all your support.
I wish (Company) continued success, and I want to thank you for allowing me to be a part of your team. Please feel free to contact me at any time if I can be of further assistance in helping with a smooth transition.