1. Home
  2. Knowledge Base
  3. GMS
  4. How can I import data into Address Books?

How can I import data into Address Books?

Question

GMS Webmail already provides a method for importing address book information from the GUI.

This entry covers a method that could be used by scheduled events to update the address book.

Answer

The address books can be updated by running an MML script using the "mail -j" command. A complete explanation of mail.exe is available in the Gordano reference manual.

Below is an example script which can be run via mail.exe to import an LDIF file into the base level system book.

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");
}

NOTE This is unsupported and not guaranteed to work in future releases.

See Also:

Keywords:address books import importing

Was this article helpful?

Related Articles

Need Support?

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