Exemple #1
0
        public static int register(string firstname, string lastname, string username, string email, string pass, string dob, string cellno, string type, int status, string picture, int accid, string domain)
        {
            myDAL obj = new myDAL();
            int   id  = obj.register(firstname, lastname, username, email, pass, dob, cellno, type, status, picture, accid);

            if (id == 0)
            {
                return(id);
            }
            if (status == 0)
            {
                MailMessage o = new MailMessage("*****@*****.**", email, "Confirm Email", "<div><a href = " + "\"" + domain + "/Home.aspx?id=" + Encrypt(id.ToString()) + "\" > Click Here To Confirm Your Email </a></div> ");
                o.IsBodyHtml = true;
                NetworkCredential netCred = new NetworkCredential("*****@*****.**", "QW[]14zx");
                SmtpClient        smtpobj = new SmtpClient("smtp.live.com", 587);
                smtpobj.EnableSsl   = true;
                smtpobj.Credentials = netCred;
                smtpobj.Send(o);
            }
            return(id);
        }