WebMail Pro documentation

Adding modules


WebMail Pro allows for installing additional modules from AfterLogic or third-party repositories. You can browse our Modules directory to find modules you may wish to install.

In Aurora platform, composer is used as package manager. When you're adding a module to your installation, it will be downloaded and installed by this package manager. And since the approach of adding modules is identical to adding packages in composer, you might be aware of it already - if not, you'll find the detailed info below.


To perform installing additional modules you will need:

Download composer.phar from https://getcomposer.org/composer.phar and place it in root directory of your WebMail Pro installation.

Install gulp-cli module globally

npm install --global gulp-cli

then install the modules required for adminpanel to work

cd modules/AdminPanelWebclient/vue
npm install
npm install -g @quasar/cli
cd ../../..

Configuring module dependencies

1. You need to specify a new dependency for your installation. Build configuration is specified in composer.json file.

To declare dependency, supply module name and version in require section of composer.json file using the following format:

"afterlogic/some-module-name-here": "0.4.0"

When modifying the file, be sure to maintain valid JSON format.

2. Then, make sure composer is aware where manifest of the module can be found. This is where repositories section of composer.json file is affected.

a) if module is created by AfterLogic, it's already included into AfterLogic modules registry:

{"type": "composer", "url":"https://afterlogic.com/composer/"}

and altering repositories section is not required.

b) if it's a third-party module and it's added to registry of composer, i.e. found at packagist.org, altering repositories section is not required.

c) if it's a third-party module found in public git repository, it needs to be added to repositories section:

{"type": "git", "url":"https://github.com/afterlogic/some-module-name-here"}

Installing a module

Install the module by running the following commands:

php composer.phar update

NB: It is strongly advised to run composer as non-root user. Otherwise, third-party scripts will be run with root permissions and composer issues a warning that it's not safe. We recommend running the script as the same user web server runs under.

Build static files:

npm install

1) Skins - required if module contains styles directory:

gulp styles --themes Default,DeepForest,Funny,Sand

2) JavaScript - required if module contains js directory:

gulp js:min

3) Adminpanel - required if module contains vue directory:

cd modules/AdminPanelWebclient/vue
npm run build-production
cd ../../..

Note that it's perfectly safe to rebuild all the static files, regardless of the specific module content and purpose. For example, if backend module doesn't contain any JavaScript code, you can still run the commands that rebuild JavaScript, that won't do any harm.