Beispiel #1
0
        private bool SendEmailVacational(string name, string gender, string userName, string ruta, string emailUser)
        {
            string subjet = "", messagge = "";

            string[] sepName    = name.Split(' ');
            var      fName      = ToCapitalize(sepName[0]);
            var      bienvenido = "Bienvenido";

            if (gender == "F")
            {
                bienvenido = "Bienvenida";
            }
            subjet    = "[RIBERA DEL RIO - BIENVENIDO]";
            messagge  = "<html><head><title></title></head><body style='color:black'>";
            messagge += "<div style='width: 100%'>";
            messagge += "<div style='display:flex;'>";
            messagge += "<div style='width:50%;'>";
            messagge += " <img src='http://www.inresorts.club/Views/img/novologo.png' align='left' style='width: 98px;'>";
            messagge += "</div>";
            messagge += "<div style='width:50%;'>";
            messagge += "<img src='http://cieneguillariberadelrio.com/riberadelrio/img/image006.png' align='right' style='width: 120px;padding-top: 7px;'>";
            messagge += "</div>";
            messagge += "</div>";
            messagge += "<img style='width: 100%' src='http://www.inresorts.club/Views/img/fondo.png'>";
            messagge += "<h1 style='margin-top: 2px ;text-align: center;font-weight: bold;font-style: italic;'>" + bienvenido + " " + fName + "</h1>";
            messagge += "<h2 style='text-align: center;'>Socio de Ribera del Rio Club Resort</h2>";
            messagge += "<p style='margin-left: 10%;margin-right: 10%; '>En nombre de InResorts y Ribera del Rio es un placer darle la bienvenida como socio, esperando que disfrute con nosotros las mejores experiencias. Ribera del Río Club Resort está abierto a su participación en nuestras diversas actividades, puede consultar en cualquier momento cualquier duda o enviarnos cualquier sugerencia.</p> ";
            messagge += "<p style='margin-left: 10%;margin-right: 10%; '>A continuación, le resumimos un poco la información sobre los beneficios con los que contará por formar parte de la familia de Ribera del Río Club Resort como Socio.</p> </div>";

            messagge += "<div style='width: 100%;text-align: center;display: flex; margin: 0 auto;'>";
            messagge += "<ul style='list-style: none;text-align: center; width: 88px;display: inline-block;padding: 0;margin: auto auto;'>";
            messagge += "<li> Club 365.</li><li> Noches Hoteleras.</li></ul>";
            messagge += "<ul style='list-style: none;text-align: center; width: 88px;display: inline-block;padding: 0;margin: auto auto;'>";
            messagge += "<li> Descuentos.</li><li> Viajes.</li></ul>";
            messagge += "<ul style='list-style: none;text-align: center; width: 88px;display: inline-block;padding: 0;margin: auto auto;'>";
            messagge += "<li> Valorización de Inversión.</li><li> Plan de Referencias.</li></ul></div>";

            messagge += "<div style='width: 100%'>";
            messagge += "<p style='margin-left: 10%;margin-right: 10%; '>Para Ribera del Río Club Resort, es de gran satisfacción contar con clientes tan importantes como usted y su familia que son participes del crecimiento de nuestra empresa, es por eso que, de quedar alguna interrogante al respecto, puede consultar nuestra pagina web www.cieneguillariberadelrio.com o comunicarse al telefono 938627411 o al correo de [email protected] en donde estamos prestos a cualquier inquietud, aclaración o trámites para el uso de su Membresía.</p>";
            messagge += "<p style='margin-left: 10%;margin-right: 10%; '>Para realizar cualquier pago relacionado con el contrato adquirido de la Membresía de Ribera del Rio Club Resort, recuerde que esto lo puede hacer mediante su oficina virtual o a travez de nuestras cuentas de recaudo empresarial.Es de resaltar que sus pagos sólo deberá realizarlos a las cuentas que se indican en su contrato, de lo contrario, la compañia No responderá por pagos realizados a cuenta de terceros.</p>";

            messagge += "<center><div style='width: 100%'>";
            messagge += "<a style='text-decoration: none;' href='https://inresorts.club'>";
            messagge += "<center><div style='background: #0d80ea;border-radius:10px;width: 180px;height: 58px;font-size: 16px;color: white;font-weight: bold;padding: 5px;cursor: pointer;text-align: center;margin: 23px;'>Acceso a Oficina Virtual<div></center>";
            messagge += "</a></div></center>";

            messagge += "<div style='border: 2px solid gray;margin-left: 30%;margin-right: 30%;border-radius: 8px '>";
            messagge += "<center><p> Usuario: <b>" + userName.Substring(0, userName.Length - 1) + "</b></p><p> Password: <b>" + userName.Substring(0, userName.Length - 1) + "</b></p></center></div>";
            messagge += "<p style='margin-left: 10%;margin-right: 10%; '>";
            messagge += "Le adjuntamos toda la documentación y anexos, relacionados a su afilicación </p>";
            messagge += "<div style='margin-left: 10%;'>";
            messagge += "<p style=''>Saludos Cordiales</p><p  style=''>Equipo inResorts</p> <p  style=''></p></div>";
            messagge += "<div style='margin: 5%; width: 70%;background-image: url('https://lh3.googleusercontent.com/NSDQDl8ytJrWSwMe0b3b9DlxubIal-RBEPIWI1a-15f9ynEGQ9eYjTnm-PVqst26f4KJThmjOEPK4lcVoaUw=w1016-h917-rw');'></ div > ";
            messagge += "<img style='width: 100%' src='https://preview.ibb.co/ixY7iL/fondo222.png'>";
            messagge += "</div>";


            messagge += "</body>";
            messagge += "</html>";



            Email  oemail     = new Email();
            bool   isSend     = oemail.SubmitEmail(emailUser, subjet, messagge, true, ruta, userName);
            string correoOamr = "*****@*****.**";

            oemail = null;
            oemail = new Email();
            var isSend2 = oemail.SubmitEmail(correoOamr, subjet, messagge, true, ruta, userName);



            //CORREO QUE LE LLEGA A LOS UPLINER 7 LINEAS ARRIBA
            if (auxidafi != null && userName != null && auxnameafi != null)
            {
                var idpatrocinador = auxidafi.ToString();
                brUser = new BrUser();
                var ListUpliners = brUser.GetUpliners(idpatrocinador);
                var filas        = ListUpliners.Split('¬');
                for (int i = 0; i < filas.Length; i++)
                {
                    if (!string.IsNullOrEmpty(filas[i]))
                    {
                        var upliner = filas[i].Split('|');
                        var nombreU = upliner[0];
                        var correoU = upliner[1];


                        var nombreregistrado   = name;
                        var nombrepatrocinador = auxnameafi;

                        var msjupliners = "<html><head><title></title></head><body style='color:black'>";
                        msjupliners += "<div style='width: 100%'>";
                        msjupliners += "<div style='display:flex;'>";
                        msjupliners += "<div style='width:50%;'>";
                        msjupliners += " <img src='http://www.inresorts.club/Views/img/novologo.png' align='left' style='width: 98px;'>";
                        msjupliners += "</div>";
                        msjupliners += "<div style='width:50%;'>";
                        msjupliners += "<img src='http://cieneguillariberadelrio.com/riberadelrio/img/image006.png' align='right' style='width: 120px;padding-top: 7px;'>";
                        msjupliners += "</div>";
                        msjupliners += "</div>";
                        msjupliners += "<img style='width: 100%' src='http://www.inresorts.club/Views/img/fondo.png'>";
                        msjupliners += "<h1 style='margin-top: 2px ;text-align: center;font-weight: bold;'> Felicitaciones " + nombreU + "</h1>";
                        msjupliners += "<h2 style='text-align: center;'>Tu red se expande, cuentas con un nuevo socio en tu red:</h2>";
                        msjupliners += "";

                        msjupliners += "<center><div style='width: 100%'>";
                        //msjupliners += "<p style='margin-left: 10%;margin-right: 10%; '> Click en el boton para validar el pago.</p>";
                        msjupliners += "<a style='text-decoration: none;'>";
                        msjupliners += "<center><div style='font-weight: bold;'>Socio: <div></center>";
                        msjupliners += "<center><div style='background: white;border-radius:10px;border: 1px solid #0d80ea; width: 158px;height: 30px;font-size: 16px;color: #0d80ea;font-weight: bold;padding: 4px;padding-top: 10px;text-align: center;margin: 23px;'>" + nombreregistrado + "<div></center>";
                        msjupliners += "<center><div style='font-weight: bold;'>Upliner: <div></center>";
                        msjupliners += "<center><div style='background: white;border-radius:10px;border: 1px solid #0d80ea; width: 158px;height: 30px;font-size: 16px;color: #0d80ea;font-weight: bold;padding: 4px;padding-top: 10px;text-align: center;margin: 23px;'>" + nombrepatrocinador + "<div></center>";
                        msjupliners += "</a></div></center>";

                        msjupliners += "<center><div style='width: 100%'>";
                        msjupliners += "<p style='margin: auto;'>Membresia del Socio: " + auxmembership + "</p>";
                        msjupliners += "<p style='margin: auto;'>Fecha de Inscripcion: " + hoy + "</p>";
                        msjupliners += "</div></center>";

                        msjupliners += "<div style='margin-left: 9%;'>";
                        msjupliners += "<p style='margin:5px'>Saludos Cordiales</p><p  style='margin:5px'>Equipo inResorts</p></div>";
                        msjupliners += "<div style='margin: 5%; width: 70%;background-image: url('https://lh3.googleusercontent.com/NSDQDl8ytJrWSwMe0b3b9DlxubIal-RBEPIWI1a-15f9ynEGQ9eYjTnm-PVqst26f4KJThmjOEPK4lcVoaUw=w1016-h917-rw');'></ div > ";
                        msjupliners += "<img style='width: 100%' src='https://preview.ibb.co/ixY7iL/fondo222.png'>";
                        msjupliners += "</div>";

                        msjupliners += "</body>";
                        msjupliners += "</html>";
                        subjet       = "[RIBERA DEL RIO - NUEVO SOCIO]";

                        if (!string.IsNullOrEmpty(correoU))
                        {
                            oemail.SubmitEmailNotFiles2(correoU, subjet, msjupliners, true, ruta, userName);
                        }
                    }
                }
            }

            return(isSend);
        }