It might sometimes be best to inform your boss and co-workers of your resignation in person, rather than through email. This will allow you to have a conversation about your resignation and answer any questions they might have. You can also use this opportunity to provide them with written notice of resignation (if required by your company) and to thank them for your time working together. However, a well-written email is perfectly acceptable for both starting the formal resignation process and informing your colleagues about your decision.