Added logging to email sender