Added logging for email notifications