A pretty basic example for you.
Dear
It is with great reluctance that I submit this letter of
resignation from my position as , effective from the date of this
letter.
It has been my honour to work for such an outstanding organization.
I am extremely grateful for all the guidance rendered to me for the
past X years and have enjoyed my working experience.
Thank you for the opportunity to serve .
Yours sincerely