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 (ne__t day of last date).
thank you for giving me a chance to learn and to gain the valuable e__perience 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.
yours faithfully,
(your full name)