示例#1
0
    private void enviarcorreo()
    {
        MailMessage objMail = new MailMessage();

        objMail.IsBodyHtml = true;
        objMail.From       = new MailAddress("*****@*****.**");

        objMail.To.Add(txtcorreo.Text);
        objMail.Subject = "Registro de Usuario";
        objMail.Body    = "<html xmlns='http://www.w3.org/1999/xhtml'><head runat='server'><title>Com21 S.A ::. Registro de Usuario</title></head><body><div style='width: 500px;margin-right: auto; margin-left: auto;'>" +
                          "<table style='border: 1px solid #ABCD43; width: 500px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;'><tr><td style='background-position: center top; padding: 5px; text-align: left; background-image: url(http://designsie.com/images/imagen_registro1.png); background-repeat: no-repeat; font-weight: bold;'>" +
                          "<table style='width: 100%;'><tr><td width='50%'><a href='http://designsie.com/' target='_blank'><img alt='' src='http://designsie.com/images/logocom21icon.png' width='120' /></a></td><td width='50%' style='text-align: right; font-family: Arial, Helvetica, sans-serif; font-size: 20px; font-weight: bold; padding-right: 10px;'>NUEVO CLIENTE</td>" +
                          "</tr></table></td></tr><tr><td style='padding: 5px; font-weight: bold; font-size: 14px; font-family: Arial, Helvetica, sans-serif;'>&nbsp;</td></tr><tr><td style='padding: 5px 5px 15px 5px; font-weight: bold; font-size: 14px; font-family: Arial, Helvetica, sans-serif;'>Estimado(a)</td></tr><tr><td style='padding: 5px 5px 15px 5px'>" + txtnombres.Text + " " + txtapellidos.Text + "</td>" +
                          "</tr><tr><td style='padding: 5px 5px 15px 5px; font-weight: bold; font-size: 14px; font-family: Arial, Helvetica, sans-serif;'>¡Bienvenido(a) a Com21!</td></tr><tr><td style='padding: 5px 5px 15px 5px; font-weight: bold; font-size: 12px; font-family: Arial, Helvetica, sans-serif;'>Los datos ingresados son:</td></tr><tr><td style='padding: 5px; font-weight: bold; font-size: 12px; font-family: Arial, Helvetica, sans-serif;'>" +
                          "<table style='width:100%;'><tr><td style='width: 15%; vertical-align: top; padding-top: 1px; padding-bottom: 1px; font-size: 13px;'>Usuario:</td><td style='width: 90%; vertical-align: top; padding-top: 1px; padding-bottom: 1px; padding-left: 2px; font-size: 14px; font-family: arial, Helvetica, sans-serif; font-weight: normal;'>" + txtus.Text + "</td>" +
                          "</tr><tr><td style='width: 15%; vertical-align: top; padding-top: 1px; padding-bottom: 1px; font-size: 13px;'>Correo:</td><td style='width: 90%; vertical-align: top; padding-top: 1px; padding-bottom: 1px; padding-left: 2px; font-size: 14px; font-family: arial, Helvetica, sans-serif; font-weight: normal;'>" + txtcorreo.Text + "</td>" +
                          "</tr><tr><td style='width: 15%; vertical-align: top; padding-top: 1px; padding-bottom: 1px; font-size: 13px;'>Télefono:</td><td style='width: 90%; vertical-align: top; padding-top: 1px; padding-bottom: 1px; padding-left: 2px; font-size: 14px; font-family: arial, Helvetica, sans-serif; font-weight: normal;'>" + txttelefono.Text + "</td>" +
                          "</tr><tr><td style='width: 15%; vertical-align: top; padding-top: 1px; padding-bottom: 1px; font-size: 13px;'>Celular:</td><td style='width: 90%; vertical-align: top; padding-top: 1px; padding-bottom: 1px; padding-left: 2px; font-size: 14px; font-family: arial, Helvetica, sans-serif; font-weight: normal;'>" + txtcelular.Text + "</td>" +
                          "</tr><tr><td style='width: 15%; vertical-align: top; padding-top: 1px; padding-bottom: 1px; font-size: 13px;'>Dirección:</td><td style='width: 90%; vertical-align: top; padding-top: 1px; padding-bottom: 1px; padding-left: 2px; font-size: 14px; font-family: arial, Helvetica, sans-serif; font-weight: normal;'>" + txtdireccion.Text + "</td>" +
                          "</tr></table></td></tr><tr style='background-color: #E2E2E2;'><td style='padding: 10px; font-weight: bold; font-size: 16px; font-family: Arial, Helvetica, sans-serif; text-align: right; color: #ABCD43;'>Contacto:&nbsp;&nbsp;&nbsp;<span style='font-size: 14px; color: #000000'>Tel:(+593) 42-300539</span></td></tr></table></div></body></html>";
        //envio de correos al administrador
        classCom21Correo clCorreo = new classCom21Correo();
        String           _dominio = Request.Url.Authority;

        if (_dominio == "localhost:2304")
        {
            clCorreo.EnvioLN(1, objMail);
        }
        else
        {
            clCorreo.EnvioLN(2, objMail);
        }

        // objSMTPClient.Send(objMail);
    }
示例#2
0
    private void enviarcorreo()
    {
        try
        {
            if (email_bien_escrito(txtcorreo.Text.Trim()))
            {
                MailMessage objMail = new MailMessage();
                objMail.IsBodyHtml = false;
                objMail.From       = new MailAddress("*****@*****.**");
                objMail.To.Add("*****@*****.**");
                //objMail.To.Add("[email protected],[email protected],[email protected]");
                objMail.Subject = "Información Contáctenos";
                objMail.Body    = "Los datos del contacto son:\nNombres: " + txtnombres.Text + "\nApellidos: " + txtapellidos.Text + "\nEmail: " + txtcorreo.Text + "\nTeléfono: " + txttelefono.Text + "\nAsunto: " + txtasunto.Text + "\nMensaje: " + txtmensaje.Text + "";

                //envio de correos al administrador
                classCom21Correo clCorreo = new classCom21Correo();
                String           _dominio = Request.Url.Authority;
                if (_dominio == "localhost:2304")
                {
                    clCorreo.EnvioLN(1, objMail);
                }
                else
                {
                    clCorreo.EnvioLN(2, objMail);
                }

                ingresarinbox();
                limpiar();

                pMensajesAlertas.Visible = true;
                DMensaje.Attributes.Add("class", "exito");
                DMensaje.InnerText = "Se ha enviado con exito su información.";
            }
            else
            {
                pMensajesAlertas.Visible = true;
                DMensaje.Attributes.Add("class", "error");
                DMensaje.InnerText = "Por favor digite un correo válido";
            }
        }
        catch (Exception ex)
        {
            ScriptManager.RegisterStartupScript(UpdatePanel1, UpdatePanel1.GetType(), "click", "alert('Su solicitud no fue enviada.');", true);
        }
    }
示例#3
0
    private void enviarcorreo()
    {
        MailMessage objMail = new MailMessage();

        objMail.IsBodyHtml = true;
        objMail.From       = new MailAddress("*****@*****.**");

        objMail.To.Add(txtpara.Text);
        objMail.Subject = "Respuesta a: " + txtasunto.Text;
        objMail.Body    = "<html xmlns='http://www.w3.org/1999/xhtml'><head runat='server'><title>Com21 S.A ::. Registro de Usuario</title></head><body><div style='width: 500px;margin-right: auto; margin-left: auto;'>" +
                          "<table style='border: 1px solid #ABCD43; width: 500px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;'><tr><td style='background-position: center top; padding: 5px; text-align: left; background-image: url(http://designsie.com/images/imagen_registro1.png); background-repeat: no-repeat; font-weight: bold;'>" +
                          "<table style='width: 100%;'><tr><td width='50%'><a href='http://designsie.com/' target='_blank'><img alt='' src='http://designsie.com/images/logocom21icon.png' width='120' /></a></td><td width='50%' style='text-align: right; font-family: Arial, Helvetica, sans-serif; font-size: 20px; font-weight: bold; padding-right: 10px;'>RESPUESTA</td>" +
                          "</tr></table></td></tr><tr><td style='padding: 5px; font-weight: bold; font-size: 14px; font-family: Arial, Helvetica, sans-serif;'>&nbsp;</td></tr><tr><td style='padding: 5px 5px 15px 5px; font-weight: bold; font-size: 14px; font-family: Arial, Helvetica, sans-serif;'>Estimado(a)</td></tr><tr><td style='padding: 5px 5px 15px 5px'>" + hfnombre.Value + "</td>" +
                          "</tr><tr><td style='padding: 5px; font-weight: bold; font-size: 12px; font-family: Arial, Helvetica, sans-serif;'>" +
                          "<table style='width:100%;'><tr><td style='width: 15%; vertical-align: top; padding-top: 1px; padding-bottom: 1px; font-size: 13px;'>Mensaje:</td><td style='width: 90%; vertical-align: top; padding-top: 1px; padding-bottom: 1px; padding-left: 2px; font-size: 14px; font-family: arial, Helvetica, sans-serif; font-weight: normal;'>" + txtmensaje.Text + "</td>" +
                          "</tr></table></td></tr><tr style='background-color: #E2E2E2;'><td style='padding: 10px; font-weight: bold; font-size: 16px; font-family: Arial, Helvetica, sans-serif; text-align: right; color: #ABCD43;'>Contacto:&nbsp;&nbsp;&nbsp;<span style='font-size: 14px; color: #000000'>Tel:(+593) 42-300539</span></td></tr></table></div></body></html>";
        //con puerto
        //SmtpClient objSMTPClient = new SmtpClient("smtp.gmail.com", 587);
        //objSMTPClient.EnableSsl = true;
        //objSMTPClient.UseDefaultCredentials = false;
        //objSMTPClient.Credentials = new NetworkCredential("*****@*****.**", "Steven!2012");
        ////fin con puertos

        ////sin puertos
        ////SmtpClient objSMTPClient = new SmtpClient("relay-hosting.secureserver.net");
        ////objSMTPClient.DeliveryMethod = SmtpDeliveryMethod.Network;
        ////fin de sin puertos

        //objSMTPClient.Send(objMail);
        //envio de correos al administrador
        classCom21Correo clCorreo = new classCom21Correo();
        String           _dominio = Request.Url.Authority;

        if (_dominio == "localhost:2304")
        {
            clCorreo.EnvioLN(1, objMail);
        }
        else
        {
            clCorreo.EnvioLN(2, objMail);
        }
        ingresarinbox();
        limpiar();
    }
示例#4
0
    private void enviarcorreo(DataSet _ds)
    {
        int    carga = 0;
        String data  = ViewState["DataCompra"] + "";

        DataC = data.Split('|');
        if (DataC.Length > 0)
        {            //idusuario+T+ActE+FormaP+CodUpdatePre
            MailMessage objMail = new MailMessage();
            objMail.IsBodyHtml = true;
            objMail.From       = new MailAddress("*****@*****.**");
            objMail.Priority   = MailPriority.High;
            objMail.To.Add(Request.Cookies["EmailCom21Web"].Value);
            objMail.Subject = "Orden de Compra";
            String formt = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head runat=\"server\">";
            //head
            formt = formt + "<title>Com21 S.A :: Orden de Compra</title><meta id=\"ctl00_titlepagina1\" property=\"og:title\" /><meta property=\"og:type\" content=\"company\" /><meta property=\"og:url\" content=\"http://com21.com.ec/\" /><meta property=\"og:image\" /><meta property=\"og:site_name\" content=\"Com21 S.A\" /><meta property=\"og:image:type\" content=\"image/jpg\" /><meta name=\"viewport\" content=\"width=device-width; initial-scale=1.0\" /><meta name=\"description\" content=\"Default Description\" /><meta name=\"keywords\" content=\"com21sa, com21, misión y visión de com21, misión, visión, nosotros, contactenos, quienes somos, telefonía, computo, servicios, catalogo de productos, catalogo de productos, suministros de impresión, registrate, inicio sesión, suministros de impresión guayaquil, suministros de impresión guayaquil ecuador,  ventas, venta online, electrico, pc, computadoras, cableado de red, cableado electrico, láptop, portátil, software, hardware, mouse, teclado, memorias, memoria, discos duros, disco duro, parlantes, línea blanca, refrigeradoras, neveras, tv, televisores, lcd, led, cocinas, aires acondicionados, cpu, programas, monitor, monitores, celulares, notebooks, table, cable de red, ups, tarjetas de red, tarjetas de video, mantenimiento, toner, cableado estructurado, suministros de oficina, suministros de computación, accesorios de computo, camaras de vigilancia, camaras digitales, camaras web, pen drive, flash memory, suministros xerox, hp, dell, toshiba, LG, samsung, acer, mabe, indurama, modem, coby\" /><meta name=\"summary\" content=\"Compromiso y buen servicios para todos sus clientes\" /><meta name=\"Generator\" content=\"Designsie\" /><meta name=\"Author\" content=\"Designsie.\" /><meta name=\"Origen\" content=\"Com21 S.A\" /><meta name=\"Locality\" content=\"Guayaquil, Ecuador\" /><meta name=\"author\" content=\"http://designsie.com/\" /><meta name=\"Language\" content=\"es\" /><meta name=\"robots\" content=\"INDEX,FOLLOW\" /><meta name=\"alexaVerifyID\" content=\"lePEQIViFY7NjZkOJ2x7ma53hKs\" /><script type=\"text/javascript\"> var _gaq = _gaq || [];" +
                    "_gaq.push(['_setAccount', 'UA-42436643-1']);_gaq.push(['_setDomainName', 'com21.com.ec']);_gaq.push(['_trackPageview']); (function () { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();</script><link rel=\"icon\" href=\"http://com21.com.ec/images/logocom21icon.png\" type=\"image/x-icon\" /><link href=\"http://com21.com.ec/css/css056a.css?family=Playfair+Display\" rel=\"stylesheet\" type=\"text/css\" /><link href=\"http://com21.com.ec/css/css4fe8.css?family=Open+Sans+Condensed:300\" rel=\"stylesheet\" type=\"text/css\" /><link href=\"http://com21.com.ec/css/cssaa4a.css?family=Open+Sans:400,700\" rel=\"stylesheet\" type=\"text/css\" /><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/jquery-1.7.min.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/jquery.prettyPhoto.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/superfish.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/jquery.easing.1.3.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/jquery.mobile.customized.min.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/scripts.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/easyTooltip.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/jquery.jcarousel.min.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/jquery.iosslider.min.js\"></script><!--[if lt IE 9]><style>	body {	min-width: 960px !important;}</style><![endif]--><link rel=\"stylesheet\" type=\"text/css\" href=\"http://com21.com.ec/css/styles.css\" media=\"all\" /><link rel=\"stylesheet\" type=\"text/css\" href=\"http://com21.com.ec/css/responsive.css\" media=\"all\" /><link rel=\"stylesheet\" type=\"text/css\" href=\"http://com21.com.ec/css/superfish.css\" media=\"all\" /><link rel=\"stylesheet\" type=\"text/css\" href=\"http://com21.com.ec/css/camera.css\" media=\"all\" /><link rel=\"stylesheet\" type=\"text/css\" href=\"http://com21.com.ec/css/widgets.css\" media=\"all\" /><link rel=\"stylesheet\" type=\"text/css\" href=\"http://com21.com.ec/css/cloud-zoom.css\" media=\"all\" /><link rel=\"stylesheet\" type=\"text/css\" href=\"http://com21.com.ec/css/print.css\" media=\"print\" />"+
                    "<script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/prototype.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/ccard.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/validation.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/builder.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/effects.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/dragdrop.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/controls.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/slider.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/js.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/form.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/translate.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/cookies.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/cloud-zoom.1.0.2.min.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/bootstrap.js\"></script><script type=\"text/javascript\" src=\"http://com21.com.ec/js/jspagina/msrp.js\"></script><!--[if lt IE 8]><link rel=\"stylesheet\" type=\"text/css\" href=\"http://livedemo00.template-help.com/magento_42968/skin/frontend/default/theme451/css/styles-ie.css\" media=\"all\" /><![endif]--><!--[if lt IE 7]><script type=\"text/javascript\" src=\"http://livedemo00.template-help.com/magento_42968/js/lib/ds-sleight.js\"></script><script type=\"text/javascript\" src=\"http://livedemo00.template-help.com/magento_42968/skin/frontend/base/default/js/ie6.js\"></script><![endif]--><script type=\"text/javascript\">//<![CDATA[var Translator = new Translate([]);//]]></script>";
            //fin de head
            //cuerpo
            formt = formt + "</head><body><div style=\"width: 500px;margin-right: auto; margin-left: auto;\">" +
                    "<table style=\"border: 1px solid #ABCD43; width: 500px; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px;\"><tr><td style=\"background-position: center top; padding: 5px; text-align: left; background-image: url('http://designsie.com/images/carrito_correo.png'); background-repeat: no-repeat; font-weight: bold;\"><table style=\"width: 100%;\"><tr><td width=\"50%\"><a href=\"http://designsie.com/\" target=\"_blank\"><img alt=\"\" src=\"http://com21.com.ec/images/logocom21icon.png\" width=\"120\" /></a></td><td width=\"50%\" style=\"text-align: right; font-family: Arial, Helvetica, sans-serif; font-size: 20px; font-weight: bold; padding-right: 10px;\">ORDEN DE COMPRA</td></tr></table></td></tr>" +
                    "<tr><td style=\"padding: 5px; font-weight: bold; font-size: 14px; font-family: Arial, Helvetica, sans-serif;\">&nbsp;</td></tr><tr><td style=\"padding: 5px 5px 15px 5px; font-weight: bold; font-size: 14px; font-family: Arial, Helvetica, sans-serif;\">Estimado(a)</td></tr><tr><td style=\"padding: 5px 5px 15px 5px\">";
            //datos
            String nom_ape = cargarNombreApe();
            formt = formt + nom_ape;
            formt = formt + "</td></tr><tr><td style=\"padding: 5px 5px 15px 5px; font-weight: bold; font-size: 12px; font-family: Arial, Helvetica, sans-serif;\">";
            formt = formt + "<div style=\"color: #ABCD43; font-size: 18px; font-family: Arial, Helvetica, sans-serif;\">Su pedido ha sido recibido.</div><br />Gracias por comprar en com21.com.ec, su # de orden es:&nbsp;<h2 class=\"product-name\" style=\"margin-bottom: 5px; font-weight:bold; font-size:13px;\">" + DataC[1] + "" + "</h2><br /> En breve recibirá un correo electrónico con respecto al estado de su pedido.</td></tr>";
            formt = formt + "<tr><td style=\"padding: 5px; font-weight: bold; font-size: 12px; font-family: Arial, Helvetica, sans-serif;\">";
            //aqui va productos
            //String _generar = "<ol class=\"products-list\" id=\"products-list\">";
            String _generar = "<table style=\"width: 100%; padding-top: 10px; padding-bottom: 7px; margin-bottom: 5px;\" class=\"item\">";

            /*if (DataC[3] + "" == "1")
             *  carga = 0;
             * else
             *  carga = 1;*/
            int total = _ds.Tables[0].Rows.Count;

            foreach (DataRow r in _ds.Tables[0].Rows)
            {
                _generar = _generar + "<tr><td style=\"width: 95px;\">";
                String img      = string.Empty;
                String _dominio = Request.Url.Authority;
                if (_dominio == "localhost:2304")
                {
                    img = "http://*****:*****@gmail.com", "C21PC#1988");
            //fin con puertos

            //sin puertos
            //SmtpClient objSMTPClient = new SmtpClient("relay-hosting.secureserver.net");
            //objSMTPClient.DeliveryMethod = SmtpDeliveryMethod.Network;
            //fin de sin puertos

            //objSMTPClient.Send(objMail);
        }
    }