Integration via Single Sign-On
While the product supports logging in programmatically, existing method isn't 100% perfect. It requires having main system and webmail application installed within the same domain, and it might present security issues if you transfer login credentials via GET or POST.
In version 7.4, a different method known as Single Sign-On was implemented to allow for eliminating these issues. It's invoked in a very simple and straightforward way:
if (class_exists('CApi') && CApi::IsValid())
header('Location: ../?sso&hash='.CApi::GenerateSsoToken('firstname.lastname@example.org', 'password'));
echo 'AfterLogic API isn\'t available';
It's assumed that the script is placed into one of direct subdirectories of main webmail directory, examples for instance. You can also supply direct URL like this:
header('Location: http://yourdomain.com/webmail/?sso&hash='.CApi::GenerateSsoToken('email@example.com', 'password'));
This approach allows for integration with ownCloud as well as other systems.