Although it is generally best to give notice in person with a formal resignation letter, you may also resign via e-mail.