Some updates to email functionality.