As Clough says, you should not resign by e-mail. In fact it would be best, if possible, to resign in a face to face meeting with your supervisor, at the same time handing her/him a resignation letter. Meeting or not, at the minimum you need to provde a letter
I hope you are moving on to a new job. If you do not already have a job lined up, it is wise to wait until you have one before quitting. It is OK to state in the letter that you are moving to a new job, putting it in terms of advancing your career. If you wish to add that that you also have personal reasons, that is OK too but you need not go into detail.
You can do an Internet search for letter formats. This one Business Letter Format
would work although you can simplify it if you wish. Basically, be neat and orderly.
Be sure you check your spelling!
Rememeber that, as you leave, you want to leave a good impression of yourself in case you need references later... or need to return to that company.