Ejemplo n.º 1
0
        public string SendInvitaion(string FName, string LName, string Email, string Desc)
        {
            string Content = FCommon.GetEmailTemplateBody("Invitation.txt");
            //Content = Content.Replace("@Logo", "<img src='http://www.salamislam.com/sites/default/files/video_poster/Eid-ul-Fitr-2013.-India-2.jpg'>");
            ////FCommon.SendEmail("*****@*****.**", "", "Tresmark Talk Chat", Content);

            //FCommon.SendEmail("*****@*****.**", Email, "Invitation", Content);
            CFSession CFSess = (CFSession)Session["CFSess"];
            string    Fasih  = HttpUtility.UrlEncode(FCommon.Encrypt("ToID:" + ((CFSession)Session["CFSess"]).ID + "~ToEmail:" + Email + "~FName:" + FName + "~LName:" + LName + "~Desc:" + Desc));

            string link = "http://175.107.202.227:8080/Account/Login?q=" + Fasih;

            Content = Content.Replace("@Link", link);
            Content = Content.Replace("@MyName", CFSess.FirstName + " " + CFSess.LastName);
            Content = Content.Replace("@UserName", FName + " " + LName);
            Content = Content.Replace("@Note", Desc);
            if (Desc != "")
            {
                Content = Content.Replace("@DisplayNote", "block");
            }
            else
            {
                Content = Content.Replace("@DisplayNote", "none");
            }

            if (FCommon.SendEmail("*****@*****.**", Email, "Invitation", Content))
            {
                return(JsonConvert.SerializeObject(BALUser.InsertUpdateInvitation(((CFSession)Session["CFSess"]).ID, Email, 0)));
            }
            return(JsonConvert.SerializeObject(""));
        }
Ejemplo n.º 2
0
        public string ResetPassword(string Email)
        {
            DataTable dt = BALUser.GetUsers("", "", Email);

            if (dt.Rows.Count == 1)
            {
                string Content = FCommon.GetEmailTemplateBody("ForgotPassword.txt");
                Content = Content.Replace("@UserFullName", dt.Rows[0]["FirstName"] + " " + dt.Rows[0]["LastName"]);
                string link = "http://*****:*****@Link", link);

                if (FCommon.SendEmail("*****@*****.**", Email, "Reset password", Content))
                {
                    return(JsonConvert.SerializeObject(FCommon.ConvertReturn("Fasih")));
                }
            }
            return(JsonConvert.SerializeObject(""));
        }