Added logging to the email alerts

Added logging to the email alerts