Exemplo n.º 1
0
        public bool VerificaParticipanteAdultoActivo(string codEvaluacion)
        {
            ParticipanteDALC objParticipanteDALC = new ParticipanteDALC();
            bool             result = objParticipanteDALC.VerificaParticipanteAdultoActivo(codEvaluacion);

            return(result);
        }
Exemplo n.º 2
0
        public int InsertarParticipanteAdulto(ParticipanteBE objParticipanteBE)
        {
            ParticipanteDALC objParticipanteDALC = new ParticipanteDALC();
            int id = 0;

            try
            {
                id = objParticipanteDALC.InsertarParticipanteAdulto(objParticipanteBE);
            }
            catch (Exception)
            {
                throw;
            }

            return(id);
        }
Exemplo n.º 3
0
        public bool InsertarParticipante(List <ParticipanteBE> lstParticipantes)
        {
            ParticipanteDALC objParticipanteDALC = new ParticipanteDALC();
            int id = 0;

            foreach (ParticipanteBE item in lstParticipantes)
            {
                try
                {
                    id = objParticipanteDALC.InsertarParticipante(item);
                }
                catch (Exception)
                {
                    throw;
                }
            }

            return(true);
        }
Exemplo n.º 4
0
        public ResultadoFinalBE ObtenerResultadoParticipante(string codigoEvaluacion, ref int[] orientaciones)
        {
            ResultadoDALC           objResultadoDALC    = new ResultadoDALC();
            ParticipanteDALC        objParticipanteDALC = new ParticipanteDALC();
            ResultadoFinalBE        objResultadoBE      = new ResultadoFinalBE();
            List <TalentoComplexBE> lstTalentos         = null;

            try
            {
                objResultadoBE.NombreParticipante = objParticipanteDALC.ObtenerNombreParticipantexCodigo(codigoEvaluacion);
                objResultadoBE.FechaTest          = objResultadoDALC.ObtenerFechaTestxCodigo(codigoEvaluacion);
                lstTalentos = objResultadoDALC.ObtenerResultadoParticipante(codigoEvaluacion);
            }
            catch (Exception)
            {
                throw;
            }

            objResultadoBE.lstTalentosMasDesarrollados        = new List <TalentoComplexBE>();
            objResultadoBE.lstTalentosMenosDesarrollados      = new List <TalentoComplexBE>();
            objResultadoBE.lstTalentosIntermedioDesarrollados = new List <TalentoComplexBE>();
            objResultadoBE.lstTEMasDesarrollados   = new List <TalentoComplexBE>();
            objResultadoBE.lstTEMenosDesarrollados = new List <TalentoComplexBE>();
            objResultadoBE.lstVirtudes             = new List <TalentoComplexBE>();
            objResultadoBE.lstTalentosTotales      = new List <TalentoComplexBE>();

            try
            {
                for (int i = 0; i < lstTalentos.Count; i++)
                {
                    switch (lstTalentos[i].Buzon_Id)
                    {
                    // Talentos más desarrollados (Buzon 1)
                    case 1:
                        if (lstTalentos[i].Seleccionado)
                        {
                            objResultadoBE.lstTalentosMasDesarrollados.Add(lstTalentos[i]);
                            orientaciones[lstTalentos[i].idTendencia - 1]++;
                        }
                        objResultadoBE.lstTalentosTotales.Add(lstTalentos[i]);
                        break;

                    // Talentos intermedios desarrollados (Buzon 2)
                    case 2:
                        if (lstTalentos[i].Seleccionado)
                        {
                            objResultadoBE.lstTalentosIntermedioDesarrollados.Add(lstTalentos[i]);
                        }
                        objResultadoBE.lstTalentosTotales.Add(lstTalentos[i]);
                        break;

                    // Talentos menos desarrollados (Buzon 3)
                    case 3:
                        if (lstTalentos[i].Seleccionado)
                        {
                            objResultadoBE.lstTalentosMenosDesarrollados.Add(lstTalentos[i]);
                        }
                        objResultadoBE.lstTalentosTotales.Add(lstTalentos[i]);
                        break;

                    // Talentos Especificos más desarrollados (Buzon 4)
                    case 4:
                        objResultadoBE.lstTEMasDesarrollados.Add(lstTalentos[i]);
                        objResultadoBE.lstTalentosTotales.Add(lstTalentos[i]);
                        break;

                    // Talentos Especificos menos desarrollados (Buzon 6)
                    case 6:
                        objResultadoBE.lstTEMenosDesarrollados.Add(lstTalentos[i]);
                        objResultadoBE.lstTalentosTotales.Add(lstTalentos[i]);
                        break;

                    // Virtudes (Buzon 7)
                    case 7:
                        if (lstTalentos[i].Seleccionado)
                        {
                            objResultadoBE.lstVirtudes.Add(lstTalentos[i]);
                        }
                        break;
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }

            return(objResultadoBE);
        }
Exemplo n.º 5
0
        public void CargarResultadosMasivos(List <ResultadoFinalBE> lstResultados)
        {
            string        codigosMasDesarrollados     = "";
            string        codigosMenosDesarrollados   = "";
            string        codigosTEMasDesarrollados   = "";
            string        codigosTEMenosDesarrollados = "";
            string        codigosVirtudes             = "";
            string        codigosTalentos             = "";
            string        masDesarrollados            = "";
            string        menosDesarrollados          = "";
            string        TEMasDesarrollados          = "";
            string        TEMenosDesarrollados        = "";
            string        virtudes           = "";
            string        seleccionados      = "";
            string        buzones            = "";
            int           codigoParticipante = 0;
            int           codigoResultado    = 0;
            TalentoDALC   objtalentoDALC     = new TalentoDALC();
            ResultadoDALC objResultadoDALC   = new ResultadoDALC();

            foreach (var item in lstResultados)
            {
                codigosMasDesarrollados     = "";
                codigosMenosDesarrollados   = "";
                codigosTEMasDesarrollados   = "";
                codigosTEMenosDesarrollados = "";
                codigosVirtudes             = "";
                codigosTalentos             = "";
                masDesarrollados            = "";
                menosDesarrollados          = "";
                TEMasDesarrollados          = "";
                TEMenosDesarrollados        = "";
                virtudes      = "";
                seleccionados = "";
                buzones       = "";

                for (int i = 0; i < item.lstTalentosMasDesarrollados.Count; i++)
                {
                    masDesarrollados = masDesarrollados + "'" + item.lstTalentosMasDesarrollados[i].nombre + "', ";
                    seleccionados    = seleccionados + "1, ";
                    buzones          = buzones + "1, ";
                }

                for (int i = 0; i < item.lstTalentosMenosDesarrollados.Count; i++)
                {
                    menosDesarrollados = menosDesarrollados + "'" + item.lstTalentosMenosDesarrollados[i].nombre + "', ";
                    seleccionados      = seleccionados + "1, ";
                    buzones            = buzones + "3, ";
                }

                for (int i = 0; i < item.lstTEMasDesarrollados.Count; i++)
                {
                    TEMasDesarrollados = TEMasDesarrollados + "'" + item.lstTEMasDesarrollados[i].nombre + "', ";
                    seleccionados      = seleccionados + "1, ";
                    buzones            = buzones + "4, ";
                }

                for (int i = 0; i < item.lstTEMenosDesarrollados.Count; i++)
                {
                    TEMenosDesarrollados = TEMenosDesarrollados + "'" + item.lstTEMenosDesarrollados[i].nombre + "', ";
                    seleccionados        = seleccionados + "1, ";
                    buzones = buzones + "6, ";
                }

                for (int i = 0; i < item.lstVirtudes.Count; i++)
                {
                    virtudes      = virtudes + "'" + item.lstVirtudes[i].nombre + "', ";
                    seleccionados = seleccionados + "1, ";
                    buzones       = buzones + "7, ";
                }

                //clausula = masDesarrollados + menosDesarrollados + TEMasDesarrollados + TEMenosDesarrollados + virtudes;

                try
                {
                    codigosMasDesarrollados     = objtalentoDALC.ObtenerCodigos(masDesarrollados);
                    codigosMenosDesarrollados   = objtalentoDALC.ObtenerCodigos(menosDesarrollados);
                    codigosTEMasDesarrollados   = objtalentoDALC.ObtenerCodigos(TEMasDesarrollados);
                    codigosTEMenosDesarrollados = objtalentoDALC.ObtenerCodigos(TEMenosDesarrollados);
                    codigosVirtudes             = objtalentoDALC.ObtenerCodigos(virtudes);

                    codigosTalentos = codigosMasDesarrollados + ", " + codigosMenosDesarrollados + ", " + codigosTEMasDesarrollados + ", " +
                                      codigosTEMenosDesarrollados + ", " + codigosVirtudes;
                }
                catch (Exception ex)
                {
                    throw ex;
                }


                ParticipanteBE   objParticipanteBE   = new ParticipanteBE();
                ParticipanteDALC objParticipanteDALC = new ParticipanteDALC();

                objParticipanteBE.DNI               = item.DNI;
                objParticipanteBE.Nombres           = item.NombreParticipante;
                objParticipanteBE.ApellidoMaterno   = item.ApellidoMaterno;
                objParticipanteBE.ApellidoPaterno   = item.ApellidoPaterno;
                objParticipanteBE.Cargo             = item.CargoEmpresa;
                objParticipanteBE.CorreoElectronico = item.CorreoElectronico;
                objParticipanteBE.NivelInstruccion  = item.NivelInstruccion;
                objParticipanteBE.FechaNacimiento   = item.FechaNacimiento;
                objParticipanteBE.Sexo              = item.Sexo;
                objParticipanteBE.Institucion       = item.Institucion;
                try
                {
                    codigoParticipante = objParticipanteDALC.InsertarParticipante(objParticipanteBE);
                }
                catch (Exception)
                {
                    throw;
                }


                if (codigoParticipante > 0)
                {
                    ResultadoBE objResultadoBE = new ResultadoBE();

                    objResultadoBE.NombreParticipante = item.NombreParticipante;
                    objResultadoBE.DNI = item.DNI;
                    objResultadoBE.CorreoElectronico = item.CorreoElectronico;
                    objResultadoBE.Participante_id   = codigoParticipante;
                    objResultadoBE.Fecha             = DateTime.Now;
                    objResultadoBE.TalentoId         = codigosTalentos;
                    objResultadoBE.Seleccionado      = seleccionados;
                    objResultadoBE.BuzonId           = buzones;
                    objResultadoBE.EsMasivo          = true;
                    objResultadoBE.CodEvaluacion     = item.CodigoEvaluacion;

                    try
                    {
                        codigoResultado = objResultadoDALC.InsertarResultado(objResultadoBE);
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }


                    if (codigoResultado > 0)
                    {
                        objResultadoBE.Resultado_id = codigoResultado;

                        try
                        {
                            objResultadoDALC.ResultadoActualizar(objResultadoBE);
                        }
                        catch (Exception ex)
                        {
                            throw ex;
                        }
                    }
                }
            }
        }
Exemplo n.º 6
0
        public bool EnviarMail(string CodEvaluacion, string token)
        {
            ParticipanteDALC objParticipanteDALC = new ParticipanteDALC();

            string correoElectronico = "";

            string codigoEvaluacion = "";


            string nombre = objParticipanteDALC.ObtenerNombreParticipante(CodEvaluacion, ref correoElectronico, ref codigoEvaluacion);


            string smtpAddress = ConfigurationSettings.AppSettings["SMTP"].ToString();


            int portNumber = Convert.ToInt32(ConfigurationSettings.AppSettings["PUERTO"]);


            bool enableSSL = Convert.ToBoolean(ConfigurationSettings.AppSettings["ENABLESSL"]);


            string url = ConfigurationSettings.AppSettings["URL_REPORTE"].ToString();


            string urlIn = ConfigurationSettings.AppSettings["URL_INTERES"].ToString();


            string emailFrom = ConfigurationSettings.AppSettings["FROM"].ToString();


            string emailUserName = ConfigurationSettings.AppSettings["EMAILUSERNAME"].ToString();


            string contrasena = ConfigurationSettings.AppSettings["PASSWORD"].ToString();


            string emailTo = correoElectronico;


            string subject = "Test de Talentos - Reporte de Resultados";


            //string body = @"Estimado(a) #NOMBRE#, gracias por utilizar el Test de Talentos.<br/>Para visualizar el resultado del test haga clic <a href='#URL_TALENTOS#'>aqui</a>: <br/>" +


            // "Para visualizar el resultado de su evaluacn de intereses haga clic <a href='#URL_INTERES#'>aqui</a><br/><br/>Gracias.";


            string body = "<table border='0' cellpadding='0' cellspacing='0' width='100%' style='border:1px #e1e1e1 solid;background:#e9e9e9'>";

            body = body + "<tbody><tr>";

            body = body + "<td align='center' valign='top'>";

            body = body + "<table border='0' cellpadding='0' cellspacing='0' width='100%'>";

            body = body + "<tbody><tr>";

            body = body + "<td>";

            body = body + "<div style='background:#ff1901'>";

            body = body + "<h1 style='font-size:16px;margin:0;display:block;color:#fff;padding:10px;font-weight:normal'>";

            body = body + "<span style='display:block;float:right;font-size:23px;font-weight:bold;padding:10px 3%;text-align:right;width:44%'>";

            body = body + "<img src='https://ci5.googleusercontent.com/proxy/6iu7Um6fyFpLqlyy8MSsXbMI14XYmc07TsSW4D8ZH6PFbGCPU5ia22XpcnMaRnflf7OedIkvE3f5sgM4gCz5__vK1WtdtZ7zxcAKSwz9qx6UsqtTVZXDpSM=s0-d-e1-ft#http://www.upc.edu.pe/sites/all/themes/upc_2013/img/logo_footer.png' title='UPC' alt='UPC'>";

            body = body + "</span>";

            body = body + "<span style='display:block;float:left;font-size:23px;padding:10px 3%;text-align:left;width:44%'>Test de Talentos</span>";

            body = body + "<div style='clear:both'></div>";

            body = body + "</h1>";

            body = body + "</div>";

            body = body + "</td>";

            body = body + "</tr>";

            body = body + "</tbody></table>";

            body = body + "</td>";

            body = body + "</tr>";

            body = body + "<tr>";

            body = body + "<td align='center' valign='top'>";

            body = body + "<table border='0' cellpadding='0' cellspacing='0' width='580'>";

            body = body + "<tbody><tr>";

            body = body + "<td valign='top'>";

            body = body + "<table border='0' cellpadding='0' cellspacing='0' width='100%'>";

            body = body + "<tbody><tr>";

            body = body + "<td valign='top'>";

            body = body + "<div></div>";

            body = body + "<div style='background:#e9e9e9;padding:40px 24px;font-family:helvetica,arial,sans-serif'>";

            body = body + "<p>Estimado(a)&nbsp;#NOMBRE#,</p>";

            body = body + "<p>&nbsp;</p>";

            body = body + "<p>Has completado satisfactoriamente los tests de <strong>Intereses</strong> y <strong>Talentos</strong>. </strong>&nbsp;.";

            body = body + "<p>&nbsp;</p>";

            body = body + "<p>Para ver tus resultados, consulta los siguientes enlaces:&nbsp;</p>";

            body = body + "<p>&nbsp;</p>";

            body = body + "<p><em><a title='Informe Test de Intereses' href='#URL_INTERES#' target='_blank'>Resultados del <strong>Test de Intereses</strong></a></em></p>";

            body = body + "<p><em><a title='Informe Test de Talentos' href='#URL_TALENTOS#' target='_blank'>Resultados del <strong>Test de Talentos</strong></a></em></p>";

            body = body + "<p><em>&nbsp;</em></p>";

            body = body + "<p>Te sugerimos que leas los informes con atención. Mientras lo haces, piensa en cómo te describen estos resultados.</p>";

            body = body + "<p><em>&nbsp;</em></p>";

            body = body + "<p><em>&nbsp;</em></p>";

            body = body + "<p><strong>Lo que viene ahora ...</strong></p>";

            body = body + "<p><em>&nbsp;</em></p>";

            body = body + "<p>Si tienes una <strong>entrevista de admisión</strong> ya programada, recuerda estar en la universidad 10 minutos antes de la hora pactada.</p>";

            body = body + "<p><em>&nbsp;</em></p>";

            body = body + "<p>Si tienes alguna consulta sobre tus resultados o quieres pedir una entrevista con un orientador de UPC, escríbenos a: <a href='*****@*****.**'>[email protected]</a></p>";

            body = body + "<p><em>&nbsp;</em></p>";

            body = body + "<p>Atentamente.</p>";

            body = body + "<p>Universidad Peruana de Ciencias Aplicadas</p>";

            body = body + "</div> ";

            body = body + "</td>";

            body = body + "</tr>";

            body = body + "</tbody></table>";

            body = body + "</td>";

            body = body + "</tr>";

            body = body + "</tbody></table>";

            body = body + "</td>";

            body = body + "</tr>";

            body = body + "</tbody></table>";


            string urlTalentos = url + "?id=" + codigoEvaluacion;


            string urlInteres = urlIn + "?id=" + codigoEvaluacion + "&token=" + token;


            body = body.Replace("#NOMBRE#", nombre);


            body = body.Replace("#URL_TALENTOS#", urlTalentos);


            body = body.Replace("#URL_INTERES#", urlInteres);


            MailMessage mail = new MailMessage();


            SmtpClient SmtpServer = new SmtpClient(smtpAddress);


            mail.From = new MailAddress(emailFrom, "UPC - Notificación");


            mail.To.Add(new System.Net.Mail.MailAddress(emailTo));//emailTo);


            mail.Subject = subject;

            //Evitar que el correo se vaya al SPAM
            mail.Headers.Add("From", "UPC - Notificación <*****@*****.**>");
            mail.Headers.Add("Return-Path", "*****@*****.**");
            mail.Headers.Add("Reply-To", "*****@*****.**");
            mail.Headers.Add("Organization", "UPC");
            mail.Headers.Add("MIME-Version", "1.0");
            //mail.Headers.Add("Content-type", "text/html; charset=iso-8859-1");
            mail.Headers.Add("Content-type", "text/html; charset=UTF-8");
            //mail.Headers.Add("Content-Transfer-Encoding", "uuencode");
            mail.Headers.Add("X-Priority", "2");
            mail.Headers.Add("X-Sender", "*****@*****.**");
            mail.Headers.Add("X-Mailer", "Microsoft.NET Framework v2.0.50727");


            mail.Body = body;


            mail.IsBodyHtml = true;

            SmtpServer.Credentials = new System.Net.NetworkCredential(emailUserName, contrasena);

            SmtpServer.EnableSsl = enableSSL;

            SmtpServer.Send(mail);


            return(true);
        }
Exemplo n.º 7
0
        public string ObtenerPasswordParticipante(string DNI)
        {
            ParticipanteDALC objParticipanteDALC = new ParticipanteDALC();

            return(objParticipanteDALC.ObtenerPasswordParticipante(DNI));
        }
Exemplo n.º 8
0
        public List <ParticipanteBE> ListarParticipantesMasivos()
        {
            ParticipanteDALC objParticipanteDALC = new ParticipanteDALC();

            return(objParticipanteDALC.ListarParticipantesMasivos());
        }
Exemplo n.º 9
0
        //Solo link de talentos Adultos
        public bool EnviarMailAdulto_Talentos(string CodEvaluacion, string token)
        {
            ParticipanteDALC objParticipanteDALC = new ParticipanteDALC();

            string correoElectronico = "";

            string codigoEvaluacion = "";


            string nombre = objParticipanteDALC.ObtenerNombreParticipanteAdulto(CodEvaluacion, ref correoElectronico, ref codigoEvaluacion);


            string smtpAddress = ConfigurationSettings.AppSettings["SMTP"].ToString();


            int portNumber = Convert.ToInt32(ConfigurationSettings.AppSettings["PUERTO"]);


            bool enableSSL = true;


            string url = ConfigurationSettings.AppSettings["URL_REPORTE_ADULTO"].ToString();


            string emailFrom = ConfigurationSettings.AppSettings["FROM_FISCHMAN"].ToString();


            string contrasena = ConfigurationSettings.AppSettings["PASSWORD_FISCHMAN"].ToString();


            string emailTo = correoElectronico;


            string subject = "Test de Talentos - Reporte de Resultados";


            string body = "<table border='0' cellpadding='0' cellspacing='0' width='100%' style='border:1px #e1e1e1 solid;background:#e9e9e9'>";

            body = body + "<tbody><tr>";

            body = body + "<td align='center' valign='top'>";

            body = body + "<table border='0' cellpadding='0' cellspacing='0' width='100%'>";

            body = body + "<tbody><tr>";

            body = body + "<td>";

            body = body + "<div style='background:#f2900c;'>";

            body = body + "<h1 style='font-size:16px;margin:0;display:block;color:#fff;padding:10px;font-weight:normal'>";

            body = body + "<span style='display:block;float:right;font-size:23px;font-weight:bold;padding:10px 3%;text-align:right;width:44%'>";

            /*
             * body = body + "<img src='https://ci5.googleusercontent.com/proxy/6iu7Um6fyFpLqlyy8MSsXbMI14XYmc07TsSW4D8ZH6PFbGCPU5ia22XpcnMaRnflf7OedIkvE3f5sgM4gCz5__vK1WtdtZ7zxcAKSwz9qx6UsqtTVZXDpSM=s0-d-e1-ft#http://www.upc.edu.pe/sites/all/themes/upc_2013/img/logo_footer.png' title='UPC' alt='UPC'>";
             */
            body = body + "</span>";

            body = body + "<span style='display:block;float:left;font-size:23px;padding:10px 3%;text-align:left;width:44%'>Test de Talentos</span>";

            body = body + "<div style='clear:both'></div>";

            body = body + "</h1>";

            body = body + "</div>";

            body = body + "</td>";

            body = body + "</tr>";

            body = body + "</tbody></table>";

            body = body + "</td>";

            body = body + "</tr>";

            body = body + "<tr>";

            body = body + "<td align='center' valign='top'>";

            body = body + "<table border='0' cellpadding='0' cellspacing='0' width='580'>";

            body = body + "<tbody><tr>";

            body = body + "<td valign='top'>";

            body = body + "<table border='0' cellpadding='0' cellspacing='0' width='100%'>";

            body = body + "<tbody><tr>";

            body = body + "<td valign='top'>";

            body = body + "<div></div>";

            body = body + "<div style='background:#e9e9e9;padding:40px 24px;font-family:helvetica,arial,sans-serif'>";

            body = body + "<p>Estimado(a)&nbsp;#NOMBRE#,</p>";

            body = body + "<p>&nbsp;</p>";

            body = body + "<p>Has completado satisfactoriamente el test de <strong>Talentos</strong>. </strong>&nbsp;";

            body = body + "<p>&nbsp;</p>";

            body = body + "<p>Para ver su resultado, consulte el siguiente enlace:&nbsp;</p>";

            body = body + "<p>&nbsp;</p>";

            body = body + "<p><em><a title='Informe Test de Talentos' href='#URL_TALENTOS#' target='_blank'>Resultados del <strong>Test de Talentos</strong></a></em></p>";

            body = body + "<p><em>&nbsp;</em></p>";

            body = body + "<p>Le sugerimos que lea el informe con atención. Mientras lo hace, piense en cómo le describen estos resultados.</p>";

            body = body + "<p><em>&nbsp;</em></p>";

            body = body + "<p>Atentamente.</p>";

            body = body + "<p>Fischman Consultores</p>";

            body = body + "</div> ";

            body = body + "</td>";

            body = body + "</tr>";

            body = body + "</tbody></table>";

            body = body + "</td>";

            body = body + "</tr>";

            body = body + "</tbody></table>";

            body = body + "</td>";

            body = body + "</tr>";

            body = body + "</tbody></table>";


            string urlTalentos = url + "?id=" + codigoEvaluacion;


            body = body.Replace("#NOMBRE#", nombre);


            body = body.Replace("#URL_TALENTOS#", urlTalentos);



            MailMessage mail = new MailMessage();


            SmtpClient SmtpServer = new SmtpClient(smtpAddress);

            mail.From = new MailAddress(emailFrom, "Fischman - Notificación");

            mail.To.Add(new System.Net.Mail.MailAddress(emailTo));//emailTo);


            mail.Subject = subject;

            //Evitar que el correo se vaya al SPAM
            mail.Headers.Add("From", "Fischman - Notificación <*****@*****.**>");
            mail.Headers.Add("Return-Path", "*****@*****.**");
            mail.Headers.Add("Reply-To", "*****@*****.**");
            mail.Headers.Add("Organization", "FyA");
            mail.Headers.Add("MIME-Version", "1.0");
            //mail.Headers.Add("Content-type", "text/html; charset=iso-8859-1");
            mail.Headers.Add("Content-type", "text/html; charset=UTF-8");
            //mail.Headers.Add("Content-Transfer-Encoding", "uuencode");
            mail.Headers.Add("X-Priority", "2");
            mail.Headers.Add("X-Sender", "*****@*****.**");
            mail.Headers.Add("X-Mailer", "Microsoft.NET Framework v2.0.50727");

            mail.Body = body;



            mail.IsBodyHtml = true;

            SmtpServer.Credentials = new System.Net.NetworkCredential(emailFrom, contrasena);

            SmtpServer.EnableSsl = enableSSL;

            SmtpServer.Send(mail);


            return(true);
        }