Exemplo n.º 1
0
 public bool Put(string value, ReleaseManagementModel manager)
 {
     try
     {
         bool   updated = false;
         string email   = bl.GetEmail(manager.Username);
         updated = bl.UpdateModuleStatustoManager(value);
         if (updated)
         {
             MailMessage mail       = new MailMessage();
             SmtpClient  SmtpServer = new SmtpClient("smtp.gmail.com");
             mail.From = new MailAddress("*****@*****.**");
             mail.To.Add(email);
             mail.Subject           = "Module Status Update To Manager";
             mail.Body              = manager.Username + " " + "Modules Completed Successfully";
             SmtpServer.Port        = 587;
             SmtpServer.Credentials = new System.Net.NetworkCredential("*****@*****.**", "dbinfosys29");
             SmtpServer.EnableSsl   = true;
             SmtpServer.Send(mail);
         }
         return(updated);
     }
     catch (Exception e)
     {
         return(false);
     }
 }
Exemplo n.º 2
0
 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);
     }
 }