It is with great regret, that I have to inform you of my intention to resign from this company effective from< >. I have been offered a better position and salary with < > (please find attached demand letter from the above company for your review).
please add if anything needed more in this letter.
It is unnecessary to give a reason in a letter of resignation, and entirely inappropriate to discuss the terms of another offer.
One thing to remember in writing letters of resignation: Never burn your bridges! You never know when you may be back on your knees begging for a position at the old company, or - and this is perhaps even more likely - when you may find yourself working for the same manager again in your new company!
Simply offer your resignation with the appropriate notice. If you feel it necessary to add something then add a line about how you have appreciated the opportunities you have enjoyed at your current company. Nothing flowery (don't talk about the deep and lasting friendships you've developed, or how this job has equipped you to face the world unafraid, or anything trite. Just, "I wish to tender my resignation effective May 1."
Another thing I learned long ago (and often forget): "I never got in trouble for the things I never said."