Allowing password change without offering webmail

Articles and documents provided by support staff covering Mailtraq features and general operation.

Allowing password change without offering webmail

Postby Susan Bunbury » Fri Aug 26th, 2005 3:43pm

Administrators will be aware that there is an option in WebMail to allow Users to change their own passwords. Here is a utility to allow users to change their passwords without offering webmail.

With Mailtraq shutdown, create a folder C:\Program Files\Mailtraq\WebMail\password. In that folder place a file called: index.asp which contains the following:

Code: Select all

  var msg = "Change your password here";
  if (Request.HasField("username")) {
    var user = Config.GetUser(Request.Fields("username"));
    if (user) {
      if (user.Password == Request.Fields("password")) {
        if (Request.Fields("newpassword1") == Request.Fields("newpassword2")) {
          user.Password = Request.Fields("newpassword1");
          msg = "Password Updated";
        } else {
          msg = "New passwords do not match";
      } else {
        msg = "Current Password is incorrect";
    } else {
      msg = "No such user";

    <TITLE>Password Change</TITLE>
    <H1>User Password Change</H1>
    <H2><%= msg %></H2>
      <H3>Your Username<BR><INPUT TYPE="edit" NAME="username" SIZE="32"></H3>
      <H3>Current Password<BR><INPUT TYPE="password"  NAME="password" SIZE="24"></H3>
      <H3>New Password<BR><INPUT TYPE="password" NAME="newpassword1" SIZE="24"></H3>
      <H3>Confirm New Password<BR><INPUT TYPE="password" NAME="newpassword2" SIZE="24"></H3>
      <INPUT TYPE="submit">

Next, Restart Mailtraq. Now if you browse to say, Users have access to the password utility without having to give them webmail privileges.
Best wishes,

Sales and Initial Support
Enstar Mailtraq
User avatar
Susan Bunbury
Mailtraq Enstar Sales and Support
Posts: 359
Joined: Mon Aug 22nd, 2005 3:09pm
Location: CT, USA

Return to Mailtraq Knowledgebase and FAQ

Who is online

Users browsing this forum: No registered users and 1 guest