Added some logging to email service.