public bool Put([FromBody] ReleaseManagementModel model) { try { bool updated = false; string email = bl.GetEmail(model.Username); updated = bl.UpdateForgotPassword(model.Username, model.Password); if (updated) { MailMessage mail = new MailMessage(); SmtpClient SmtpServer = new SmtpClient("smtp.gmail.com"); mail.From = new MailAddress("*****@*****.**"); mail.To.Add(email); mail.Subject = "Password updation Status"; mail.Body = email + "Password updated Successfully"; SmtpServer.Port = 587; SmtpServer.Credentials = new System.Net.NetworkCredential("*****@*****.**", "dbinfosys29"); SmtpServer.EnableSsl = true; SmtpServer.Send(mail); } return(updated); } catch (Exception e) { return(false); } }