public HttpResponseMessage CompanyApproved(Guid accId) { string companyEmailAddress = String.Empty; try { //var accId = vm.CompanyId; PractitionerBusiness businessLayer = new PractitionerBusiness(); companyEmailAddress = businessLayer.CompanyApproved(accId); if (!String.IsNullOrEmpty(companyEmailAddress)) { string mailFrom = ConstantHelper.AppSettings.MailFrom; string emailSubject = ConstantHelper.Email.CompanyVerification.CompanyApprovedSubject; string emailBody = ConstantHelper.Email.CompanyVerification.CompanyApprovedBody; string userName = ConstantHelper.AppSettings.UserName; string password = ConstantHelper.AppSettings.Password; EmailHelper.SentMail(mailFrom, companyEmailAddress, emailSubject, emailBody, userName, password); } } catch (Exception err) { new LogHelper().LogMessage("RegistrationController.CompanyApproved : " + err); } string route = ConstantHelper.AppSettings.RootSiteUrl + "HomePage/CompanyApproved"; var response = Request.CreateResponse(HttpStatusCode.Moved); response.Headers.Location = new Uri(route); return(response); }