First attempt at seperating out just email functionality.