Dear Mr. Ben(the name of your boss):
①Please accept this letter as formal notification that I am leaving my position with XXX company on August 7.
②I have allowed 30 days prior to my departure for assisting in the transition process.
③Although I have enjoyed my job, I have received an offer for another company that I feel is better suited6 to my career objectives.
④Thank you for your kind attention and would appreciate if you could let me have a reference letter before I leave.
⑤I regret having to resign from my position. I wish you and XXX the best of luck and future success.
⑥If I can be of any assistance during this transition, please let me know.
(your full name)