3rd November 20xx
(the name of your boss)
(company name and section work with)
Dear (the name of your boss),
I regret to inform you that I decided to resign from my present position as (position) with effective from (next day of last date).
Thank you for giving me a chance to learn and to gain the valuable experience in (company name and section work with). I hope my resignation would not cause you much inconvenience.
Thank you for your kind attention and would appreciate if you could let me have a reference letter before I leave.
(your full name)