public void ProcessEmail(IDnaSmtpClient client, IDnaLogger logger)
        {
            try
            {
                using (MailMessage message = new MailMessage())
                {
                    message.From = new MailAddress(FromAddress);
                    message.To.Add(ToAddress);

                    message.Subject = Subject;
                    message.SubjectEncoding = Encoding.UTF8;

                    message.Body = Body;
                    message.BodyEncoding = Encoding.UTF8;

                    message.Priority = MailPriority.Normal;

                    client.SendMessage(message);
                    Sent = true;
                }
            }
            catch (Exception e)
            {
                string errorMsg = e.Message;
                if (e.InnerException != null)
                {
                    errorMsg += " : " + e.InnerException.Message;
                }
                logger.Log(System.Diagnostics.TraceEventType.Verbose, errorMsg);
                LastFailedReason = errorMsg;
                Sent = false;
            }
        }
        public void ProcessEmail(IDnaSmtpClient client, IDnaLogger logger)
        {
            try
            {
                using (var message = new MailMessage())
                {
                    message.From = new MailAddress(FromAddress);
                    foreach (var address in ToAddress.Split(';'))
                    {
                        message.To.Add(new MailAddress(address));
                    }

                    if (CCAddress != null && CCAddress.Length > 0)
                    {
                        message.CC.Add(new MailAddress(CCAddress));
                    }

                    message.Subject = Subject;
                    message.SubjectEncoding = Encoding.UTF8;

                    message.Body = Body;
                    message.BodyEncoding = Encoding.UTF8;

                    message.Priority = MailPriority.Normal;

                    client.SendMessage(message);
                    Sent = true;
                }
            }
            catch (Exception e)
            {
                var errorMsg = e.Message;
                if (e.InnerException != null)
                {
                    errorMsg += " : " + e.InnerException.Message;
                }

                logger.Log(System.Diagnostics.TraceEventType.Verbose, errorMsg);
                LastFailedReason = errorMsg;
                Sent = false;
            }
        }