public void SendNewsletter()
        {
            string        unsubscr     = string.Empty;
            string        msgbody      = string.Empty;
            EmailManager  mailmanager  = new EmailManager();
            EmailContents mailcontents = new EmailContents();

            using (StreamReader sr = new StreamReader(HttpContext.Current.Server.MapPath("~/Admin/EmailTemplates/CustomerNewsletter.htm")))
            {
                string stringBody = sr.ReadToEnd();

                foreach (DataRow dr in UserData.Tables[0].Rows)
                {
                    msgbody = stringBody;

                    unsubscr = "<a href=\"http://www.littleitalyvineyards.com/Admin/Unsubscribe.aspx?EndUserID=" +
                               dr["EndUserID"].ToString() + "?FullName=" + dr["FirstName"].ToString() + " " + dr["LastName"].ToString() +
                               "\"Target=\"_blank\"\">Click here</a>";

                    msgbody = msgbody.Replace("`+Name+", dr["FirstName"].ToString() + " " + dr["LastName"].ToString());
                    msgbody = msgbody.Replace("`+MessageBody+", MessageBody);
                    msgbody = msgbody.Replace("`+Clickhere+", unsubscr);

                    mailcontents.To               = "*****@*****.**";       // dr["Email"].ToString();
                    mailcontents.FromName         = "Little Italy Vineyards";
                    mailcontents.FromEmailAddress = "*****@*****.**";
                    mailcontents.Subject          = "Newsletter";
                    mailcontents.Body             = msgbody;

                    mailmanager.Send(mailcontents);
                }
            }
        }
        public void Send(EmailContents emailcontents)
        {
            SmtpClient client = new SmtpClient(SMTPServerName);

            client.UseDefaultCredentials = true;
            MailAddress from = new MailAddress(emailcontents.FromEmailAddress, emailcontents.FromName);
            MailAddress to   = new MailAddress(ToAddress);

            MailMessage message = new MailMessage(from, to);

            message.Subject    = emailcontents.Subject;
            message.Body       = emailcontents.Body;
            message.IsBodyHtml = true;

            try
            {
                client.Send(message);
                IsSent = true;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }