SmarterMail 3.x Help
This documentation is for a product that is no longer supported by SmarterTools.

Automation with Web Services

SmarterMail was built with custom configuration in mind. In addition to being able to customize the look and feel of SmarterMail, developers and/or System Administrators have the ability to code to the SmarterMail application using several different web services. These web services allow developers and/or System Administrators to automate a variety of different things: add domains to SmarterMail on the fly, grab domain-specific bandwidth usage for billing purposes, set details on a specific domain or server, update domain information, test servers added to the Web Interface, and more.

To view the web services and the corresponding functions available to you, go to your default Web Interface install location and append "services/SERVICENAME.asmx". Your particular SmarterMail location can be the specific IP address of the Web Interface (e.g. if you installed SmarterMail with the default installation you would use http://127.0.0.1:9998/services/SiteAdmin.asmx, etc. or a specific IP address you assigned for the Web Interface if you custom-installed SmarterMail or moved SmarterMail to a new web server) or a specific site name if you configured SmarterMail as an actual website within IIS (e.g. mail.example.com). Below you will find a brief explanation of the web services available to you, along with the default installation paths to the specific web services details page.

User Alias Administration

http://127.0.0.1:9998/Services/svcAliasAdmin.asmx

There are six (6) functions of this service available for customization. These services allow developers and/or System Administrators to dynamically create email aliases using SOAP, an HTTP GET command, or an HTTP POST command.. The functions, and their corresponding functions, are:

  • DeleteAlias - will delete a specified email alias.
  • UpdateAlias - will update a specified email alias.
  • GetAlias - will return information on a specified email alias.
  • AddAlias - will created an email alias and add it to the specified domain.
  • GetAliases - will return all aliases that belong to a specified domain.
  • SetCatchAll - sets the specified alias to be the catch-all, or clears the catch-all if a blank alias name is provided.

Domain Administration

http://127.0.0.1:9998/Services/svcDomainAdmin.asmx

There are twelve (12) functions of this service available for customization. These services allow developers and/or System Administrators to dynamically add or delete domains, return domain defaults, set a primary domain, and more using SOAP, an HTTP GET command, or an HTTP POST command (examples for each are provided as well). The functions, and their corresponding properties, are:

  • RenameDomain - renames the specified domain.
  • GetDomainSettings - returns the default domain settings in a DomainSettingsResult object.
  • GetDomainInfo - returns the default domain settings in a DomainSettingsResult object.
  • AddDomain - creates a new domain in the specified folder.
  • UpdateDomain - updates the settings for the specified domain.
  • GetAllDomains - returns a list of all domain names.
  • GetDomainDefaults - returns the default domain settings in a DomainSettingsResult object.
  • UpdateDomainNameAndPath - changes the specified domain's name and/or path.
  • DeleteDomain - deletes the specified domain.
  • GetDomainStatistics - returns the statistics for the specified domain over the specified period of time.
  • ReloadDomain - reloads the specified domain's settings.
  • SetPrimaryDomainAdmin - sets the specified user to be the primary domain admin of the specified domain.

Mail List Administration

http://127.0.0.1:9998/Services/svcMailListAdmin.asmx

There is only one function for this service. Due to amount of possible commands for list serv, it would require an almost unusable amount of commands to manage list serv via web services. What is offered as a web service is simply the removal of all lists (settings concerning lists are in the domain setup service).

  • DeleteAllLists - deletes all mailing lists that belong to the specified domain.

Product Info Web Service

http://127.0.0.1:9998/Services/svcProductInfo.asmx

There are four (4) functions of this service available for customization. These services allow developers and/or System Administrators to dynamically activate or retrieve licensing information, return product name and version number, and more using SOAP, an HTTP GET command, or an HTTP POST command. The functions, and their corresponding properties, are:

  • ActivateLicenseKey - will activate the product with a previously set license key using the specified SmarterTools account credentials.
  • GetLicenseInfo - returns the license key for the product.
  • GetProductInfo - will return the product name and version number.
  • SetLicenseKey - will set the product license key.

Global Update Web Service

http://127.0.0.1:9998/Services/svcGlobalUpdate.asmx

There are three (3) functions for this service. These services allow server administrator to set/update settings for every domain on the server using SOAP, an HTTP GET command, or an HTTP POST command. The functions, and their corresponding properties, are:

  • UpdateAllDomainSettings - sets the supplied fields and values for all domains on the server.
  • ListGlobalUpdateFields - lists all the fields that can be updated using UpdateAllDomainSettings.
  • GetGlobalUpdateStatus - gets the current status of the update (ex. 550 of 1335 domains updated).

Domain Alias Administration

http://127.0.0.1:9998/Services/svcDomainAliasAdmin.asmx

There are four (4) functions for this service. These services allow server administrator to add/remove and check domain aliases for a given domain using SOAP, an HTTP GET command, or an HTTP POST command. The functions, and their corresponding properties, are:

  • DeleteDomainAlias - deletes the specified domain alias.
  • GetAliases - returns all domain aliases that belong to the specified domain .
  • AddDomainAlias - creates a new domain alias and adds it to the specified domain.
  • AddDomainAliasWithoutMxCheck - creates a new domain alias and adds it to the specified domain without doing an MX lookup on the new alias.

User Administration

http://127.0.0.1:9998/Services/svcUserAdmin.asmx

There are twelve (12) functions of this service available for customization. These services allow developers and/or Administrators to dynamically create or delete users, return user statistics, return user attributes, update user information and more using SOAP, an HTTP GET command, or an HTTP POST command. The functions, and their corresponding properties, are:

  • AddUser - creates a new user and adds them to the specified domain.
  • GetUserStats - returns statistics of the specified user for the specified time period.
  • GetUser - returns attributes of the specified user.
  • UpdateUserAutoResponseInfo - updates the specified user's auto response settings.
  • UpdateUserForwardingInfo - updates the specified user's forwarding settings.
  • GetUsers - returns attributes of each user in the specified domain.
  • DeleteUser - deletes the specified user from the specified domain.
  • GetUserAutoResponseInfo - returns the forwarding info of the specified user.
  • GetUserForwardingInfo - returns the forwarding info of the specified user.
  • AuthenticateUser -returns a response on whether the supplied user/domain/password is valid.
  • LoginValidated - returns a LoginResult object with the LoginValidated field set to True if the specified username matches the specified password.