SMTP address retrieval from directory Directory

Directory .ZIP

This program is an example of using the Search System Directory (QOKSCHD) API (one of the Office APIs). The program retrieves the SMTP address for a given SNADS user ID and address from the system directory.

Please read the @GENERAL DISCLAIMER document for any items you should be aware of if you download any of these items.


CLPs

RTVSMTPADR -- Retrieve SMTP Address:

This program builds a request variable, calls the QOKSCHD API and extracts the resulting SMTP address from the structure returned (SMTPUSRID *tcat '@' *cat SMTPDMN). I haven't tested this except on systems where the CVTNAMSMTP command has previously disabled the WRKNAMSMTP command. I suspect it might not work otherwise.
Note:
"Thanks!" to Mark Herman of Cosyn Software for providing info on the limitations seen when running on a system where SMTP names and addresses have not been converted.

Mark comments:
Just thought you might like to know I've downloaded & tested your RTVSMTPADR CLP on our dev. m/c (V4R5) where the CVTNAMSMTP cmd has never been run to convert personal addresses to system ones.

It would appear to work fine for entries in the _System_ Alias Table and returns the internet email address as advertised. However, as you probably suspected, if there is an associated _Personal_ Alias Table entry for the same userID / address it doesn't appear to see it.

Thought you might like to know that the API seems to function correctly in both cases for userIDs /addresses but only returns results from the Sytem Alias Table, not the Personal Alias Table.

I personally recommend that CVTNAMSMTP be done, but the implications should be examined thoroughly before a decision is made for any given site. Note that no special processing is done for such things as character set and code page; all such elements are simply skipped or ignored. This might or might not work for any given site.