Esempio n. 1
0
 private void SendPasswordToUser(string password)
 {
     // email if new user
     if (SharedSupport.UsingSmtp)
     {
         string subject = SharedSupport.GetLocalizedString("ChangePassword_NewPasswordEmailSubject");
         string body    = SharedSupport.GetLocalizedString("ChangePassword_NewPassword_UsernameMessage") + " " + this._username + "\n";
         body += SharedSupport.GetLocalizedString("ChangePassword_NewPassword_Message") + " " + password;
         UserM amsaUser = UserM.Load(Constants.ASSIGNMENTMANAGER_SYSTEM_ADMIN_USERID);
         MessageM.SendMessage(amsaUser.EmailAddress, this._emailAddress, subject, body);
     }
 }
Esempio n. 2
0
        public void SendPasswordToUser()
        {
            // use Assignment Manager sysadmin email
            UserM  amsaUser     = UserM.Load(Constants.ASSIGNMENTMANAGER_SYSTEM_ADMIN_USERID);
            string sentByEmail  = amsaUser.EmailAddress;
            string emailSubject = SharedSupport.GetLocalizedString("User_EmailSubject");

            string[] replacements = new string[2] {
                this._username, this._password
            };
            string emailBody = SharedSupport.GetLocalizedString("User_EmailBody", replacements);

            MessageM.SendMessage(sentByEmail, this._emailAddress, emailSubject, emailBody);
        }