1. Home
  2. Knowledge Base
  3. GMS
  4. Can I automate the import of address books from other systems?

Can I automate the import of address books from other systems?

Question

I have a number of address books held on other systems, can I automate the synchronisation of these with the GMS Webmail address books?

Answer

As long as you are able to export from your existing application in one of the following formats LDIF, vCard or CSV, then the task of importing these into GMS Webmail can be set to run automatically at a chosen interval.

Enclosed below is a script which can be run as a timed event to import an LDIF file into the base level system book. Timed events can be set up under the System > Timed Events page.

Note that the "readaccess" and "writeaccess" parameters are not constants.

The AB_OVERWRITE option is used to replace existing records in the book. This is a better approach than deleting the book every time.

In the following example "readacess" is determined by the value of everyone_email, and "writeaccess" by the value of logon_email.

log(log_failure, "running AddrBookImport");

logon_email = "postmaster@test.dom";
everyone_email = "everyone@test.dom";

ok = AddrBookImport(logon_email,
"",
AB_SYSTEM,
logon_email,
everyone_email,
"test.dompostmasterldiffile.txt",
AB_NSV4_LDIF_FILE,
AB_OVERWRITE);

if(ok)
{
log(log_failure, "AddrBookImport OK");
}
else
{
log(log_failure, "AddrBookImport Failed");
}

NB:This is not guaranteed to work in the next release. We will be adding core functionality to manage imports in the future.

Keywords:Address book, address, ldif,csv, vcard,import

Was this article helpful?

Related Articles

Contents

Need Support?

Can't find the answer you're looking for?
Contact Support