Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/03/16 17:13:50 (8 years ago)
Author:
jlodewyc
Message:

#2582 Parameter changing busy, save file, download file and email on pass reset

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/UserController.cs

    r13805 r13827  
    132132                    user.UserName = inpusername;
    133133                    uid = accessClient.addUser(user);
     134                    accessClient.RefreshUsers();
    134135                    var newpass = accessClient.resetPassword(uid);
    135136                    sendPassmail(accessClient.Users.Find(x => x.Id == uid), newpass);
     
    172173        public static void sendPassmail(Access.User u, string pass)
    173174        {/*
    174             SmtpClient smtpClient = new SmtpClient("mail.MyWebsiteDomainName.com", 25);
    175 
    176             smtpClient.Credentials = new System.Net.NetworkCredential("info@MyWebsiteDomainName.com", "myIDPassword");
     175            SmtpClient smtpClient = new SmtpClient("smtp.gmail.com",587);
    177176            smtpClient.UseDefaultCredentials = true;
     177            smtpClient.Credentials = new System.Net.NetworkCredential("trac.heuristiclab@gmail.com", "||||||||||||");
    178178            smtpClient.DeliveryMethod = SmtpDeliveryMethod.Network;
    179179            smtpClient.EnableSsl = true;
     
    181181
    182182            //Setting From , To and CC
    183             mail.From = new MailAddress("info@MyWebsiteDomainName", "MyWeb Site");
     183            mail.From = new MailAddress("trac.heuristiclab@gmail.com", "HeuristicLab");
    184184            mail.Subject = "Password changed - HeuristicLab Hive";
    185             mail.Body = "Hello " + u.FullName + ", " +
    186                 "Your password was changed through the HeuristicLab Hive web application." +
    187                 "The new password for " + u.UserName + " is '" + pass + "'.";
     185            mail.Body = "Hello " + u.FullName + ", " + Environment.NewLine + Environment.NewLine+
     186                "Your password was changed through the HeuristicLab Hive web application." + Environment.NewLine+
     187                "The new password for " + u.UserName + " is ' " + pass + " '." + Environment.NewLine + Environment.NewLine +
     188                "HeuristicLab Hive";
    188189            mail.To.Add(new MailAddress(u.Email));
    189190
Note: See TracChangeset for help on using the changeset viewer.