public ActionResult Register(UserRegisterVM u) { try { ///creating company UserBiz userBiz = new UserBiz(); /// creating user CRMUser user = new CRMUser(); user.Password = u.Password; user.Username = u.EmailId; user.CompanyName = u.CompanyName; user.CompanyId = 0; string guid = userBiz.RegisterUser(user); //string CurrentURL = Request.Url.AbsoluteUri; string Msg = "Dear Customer,<br/><br/> Thank you for Registring with us<br/>" + "Plese Click below link for Activation<br/><br/>" + "<a href='http://*****:*****@gmail.com", "Company Registration", Msg, true); ViewBag.Message = "Succefully Registered"; return(View("RegisterSuccess")); } catch (Exception Ex) { ModelState.AddModelError("VE", Ex.Message); return(View(u)); } }
public void CreateClient <TUser>(TClient client, TUser user) where TUser : IUser { try { if (client == null) { throw new Exception("Client information is missing"); } if (user == null) { throw new Exception("User information is missing"); } if (client.Validate() && user.Validate()) { Guid userId = _clientStore.CreateClient <TUser>(client, user); //send email to client //string message = "Dear " + client.Name + "<br/> Thank you "; string fromAddress = ConfigurationManager.AppSettings["SUPPORTMAILID"]; string Msg = "Dear Customer,<br/><br/> Thank you for Registring with us<br/>" + "Plese Click below link for Activation<br/><br/>" + "<a href='http://localhost:51291/User/Activate?id=" + userId + "' > http://localhost:51291/User/Activate?id=" + userId + "</a><br/><br />" + "Thanks and Regards<br/>CRM Admin"; EmailUtilty.SendEmail(user.Username, fromAddress, "Company Registration", Msg, true); } } catch (Exception ex) { throw ex; } }
public void SendEmailSuccess() { string Msg = "Dear Customer,<br/><br/> Thank you for Registring with us<br/>Plese Click below link for Activation<br/><br/> Thanks and Regards<br/>CRM Admin"; EmailUtilty.SendEmail("*****@*****.**", "*****@*****.**", "Welcom to CRM Bug Tracker", Msg, true); }