Exemplo n.º 1
0
        public void sendConnectionMail(Object stateInfo, XElement cradle, string email)
        {
            SmtpMessage mail = new SmtpMessage();

            mail.Subject       = "CloudScan Connection Failure - " + cradle.Element("id").Value;
            mail.BodyHtml.Text = "<html><body style='font-family:Arial; font-size:10pt;'><h1>CloudScan connection failure for " + cradle.Element("id").Value + "</h1> <b>Mode:   </b>" + cradle.Element("status").Element("mode").Value + "<br><b>Status:    </b>" + cradle.Element("status").Element("description").Value + "</body></html>";
            mail.From          = new Address("*****@*****.**");

            mail.To.Add(new Address(email));

            mail.BuildMimePartTree();

            mail.DirectSend();
        }
Exemplo n.º 2
0
        public void sendMail(Object stateInfo, XElement result, string email)
        {
            SmtpMessage mail = new SmtpMessage();

            mail.Subject       = "CloudScan Test Failure - " + result.Element("deviceName").Value;
            mail.BodyHtml.Text = "<html><body style='font-family:Arial; font-size:10pt;'><h1>CloudScan failed for " + result.Element("deviceName").Value + "</h1> <b>Device ID:   </b>" + result.Element("deviceId").Value + "<br><b>Error:    </b>" + result.Element("finalResult").Element("execution").Element("output").Element("status").Element("description").Value + "</body></html>";
            mail.From          = new Address("*****@*****.**");

            mail.To.Add(new Address(email));

            mail.BuildMimePartTree();

            mail.DirectSend();
        }