bar_adminutilsprops.gif (1143 bytes)
All Properties are set as follows:  AdminUtils.<PropertyName> = <Value>

Property Name Default Value Description
DataSource "IMailDB" Set this property to the name of the system DSN you created to access the external IMail database.
DataSourcePassword Blank Password Set the value of this property to the password required to access your external database.
DataSourceUsername Blank Username Set the value of this property to the username required to access your external database.
DebugMode True Set this property to 'True'(Boolean) if you wish to view debug information in the browser window.
IMailTable "Users" Set the table name that IMail is configured to use with your install.
OrphanPeriod 60 Days Set this to the number of days you would like to set as the 'orphan' period for an account.
Password <Null> Set this equal to the new password for the user when using the .ChangePassword method.
Type <Null> Set this equal to the report you wish to run.
Options are:
  • Active
  • Disabled
  • Orphan
  • Vulgar

If this property is not set, the ShowReports method will run.

UserID ***Required Property*** Set the value of this property equal to the username of the account you would like to create.
VulgarDictionary "Dictionary" Set the value of this property to the name of your vulgar word dictionary table.
[Back to Top]

bar_adminutilsprops.gif (1143 bytes)
Assume the instance was created using: Set AdminUtils = Server.CreateObject("SCP.AdminUtils") for all examples.

Method Description/Example
ChangePassword This method changes a user's password.  ChangePassword returns a Boolean value of True if no errors occurred and False if there was a problem.

Example:

Set AdminUtils = Server.CreateObject("SCP.AdminUtils")
AdminUtils.UserID = "root"
AdminUtils.Password = "newpassword"
blnSucess = AdminUtils.ChangePassword

DeleteAccount This method deletes the account(and user folder) with the specifed UserID.

Example:

Set AdminUtils = Server.CreateObject("SCP.AdminUtils")
AdminUtils.UserID = "root"
AdminUtils.DeleteAccount

DisableAccount This method disables the account with the specifed UserID.

Example:

Set AdminUtils = Server.CreateObject("SCP.AdminUtils")
AdminUtils.UserID = "root"
AdminUtils.DisableAccount

EnableAccount This method re-enables the account with the specifed UserID.

Example:

Set AdminUtils = Server.CreateObject("SCP.AdminUtils")
AdminUtils.UserID = "root"
AdminUtils.EnableAccount

GetPassword This method will return a user's password in the form of a string.

Example:

Set AdminUtils = Server.CreateObject("SCP.AdminUtils")
AdminUtils.UserID = "root"
strPassword = AdminUtils.GetPassword

RunReport This method requires that the .Type property be passed to it.  The 'type' field MUST be one of the following:
  • "active" - Display all active accounts
  • "disabled" - Display all disabled accounts
  • "orphan" - Display all orphan accounts(determined by the OrphanPeriod property)
  • "vulgar" - Display all vulgar accounts(determined by the vulgar dictionary)

Example:

Set AdminUtils = Server.CreateObject("SCP.AdminUtils")
AdminUtils.ReportType = "disabled"
AdminUtils.RunReport

ShowReports This method simply prints a horizontal text list of the possible reports to run.

Example:

Set AdminUtils = Server.CreateObject("SCP.AdminUtils")

Response.Write ("<html><head>")
Response.Write ("<title>Forgotten Password Example</title>")
Response.Write ("</head>")
Response.Write ("<body>")
AdminUtils.ShowReports
Response.Write ("</body>")
Response.Write ("</html>")

[Back to Top]

bar_imailutilsprops.gif (1122 bytes)
All Properties are set as follows:  IMailUtils.<PropertyName> = <Value>

Property Name Default Value Description
AltEmail "" Set this value equal to the new user's alternate e-mail account if they happen to have one.
DataSource "IMailDB" Set this property to the name of the system DSN you created to access the external IMail database.
DataSourceUsername Blank Username Set the value of this property to the username required to access your external database.
DataSourcePassword Blank Password Set the value of this property to the password required to access your external database.
DebugMode True Set this property to 'True'(Boolean) if you wish to view debug information in the browser window.
Domain ***Required Property*** Set the value to the name of your IMail domain(without the @ symbol!)
FirstName ***Required Property*** Set this value equal to the User's first name
IMailTable "Users" Set the table name that IMail is configured to use with your install.
LastName ***Required Property*** Set this value equal to the user's last name
MailAdmin admin@yourdomain.com (Domain determined from .Domain property) Set the value to the full e-mail address of your mail administrator.
MailComponent "ABMailer" This property tells the component which SMTP Component you would like to use with it.(Possible values: "ABMailer", "ASPEmail", "SMTPsvg", "JMail")
MailPort "25" Set the value to the port number that the mailserver listed above is set to listen on.
MailServer "127.0.0.1" Set the value to the mail server you would like to use to send mail from when needed.
MaxSize "0" Set to maximum amount of disk space you will allow users to consume.  Measured in kilobytes(KB)
MaxMsgs "0" Set to the maximum number of messages that users are allowed to keep in their mailbox(s).
Password ***Required Property*** Set this value equal to the password chosen for a new user account.
SendWelcomeMsg True Set to True if you would like to send a welcome message to new users or set to False if you would prefer not to send a welcome message.

***Please note that this value needs to be a Boolean and NOT a string value(no " s around the value)***

UserFlags "128" - Allow Web Access Set the value to the flags you would like this user to have.  Refer to your IMail manual for possible values. If you are unsure what to set this to then accept the default value.
UserFolderPath "c:\imail\users\" Set to the path of your IMail User's folder

***Please remember to include the trailing slash***

UserID ***Required Property*** Set the value of this property equal to the username of the account you would like to create.
WebMailServer "127.0.0.1" Set to the qualified domain name of your IMail Web Messaging System(e.g.  "webmail.mydomain.com)
WebMailPort "8383" Set to the port you currently have IMail Web Messaging configured to listen on.
WelcomeMsg welcomemsg.txt The Default for this property is a file named welcomemsg.txt that is located in the specified UserFolderPath above. The contents of this file will be sent as the body to the welcome message sent to a new user if you have enabled this option.

See Welcome Message Section for more info

[Back to Top]

bar_imailutilsmeth.gif (1084 bytes)
Assume the instance was created using: Set IMailUtils = Server.CreateObject("SCP.IMailUtils") for all examples.

Method Description/Example
AddUser Required Properties:  .Domain, .WelcomeMsg, .UserID, .Password, .FirstName, .LastName

This Method returns a Boolean of True if the user was created successfully, and False if there was a problem.  There is built in error checking so most errors should be handled by the DLL.

Example:

Set IMailUtils = Server.CreateObject("SCP.IMailUtils")
IMailUtils.UserID = "MyNewUser"
IMailUtils.Password = "MyNewPassword"
IMailUtils.FirstName = "Scott"
IMailUtils.LastName = "Pouliot"
blnAddUser = IMailUtils.AddUser
If blnAddUser = True Then
    Response.Redirect "confirmation.asp" 
Else
    Response.Write "Errors Occurred During User Creation!"
End If

ForgottenPassword This method requires that a field named 'AltEmail' be added to the IMail table.

Required Properties:  .Domain, .UserID

This method sends a mail message to the user's alternate e-mail address and also prints out a message to the user informing them that the message has been sent.

Example:

Set IMailUtils = Server.CreateObject("SCP.IMailUtils")
ImailUtils.UserID = "root"
IMailUtils.Domain = "motogod.dhs.org"

Response.Write ("<html><head>")
Response.Write ("<title>Forgotten Password Example</title>")
Response.Write ("</head>")
Response.Write ("<body>")
IMailUtils.ForgottenPassword
Response.Write ("</body>")
Response.Write ("</html>")

 

[Back to Top]

bar_welcomemsg.gif (1574 bytes)

In order to send a welcome message to a new user you must create a simple text file containing your message that the DLL can read in and turn into an e-mail message.  This welcome message can contain tags, if you so choose, that will be replaced with the new user's information to make for a more personal message.

The tags are as follows:

Example:

Welcome<fullname>,
<br>
Congratulations on your new e-mail account! Your e-mail addressis<username>@<domain>.
To login to your new e-mail account simply go tohttp://<webmailserver>:<webmailport> and
enter your username and password.
<br>
If you encounter any errors please contact <mailadmin>.

Note:  <br> will be replaced with 2 carriage returns creating a blank line.

[Back to Top]

Copyright © 1999 by Scott Pouliot All Rights Reserved.