getMailInfo (NotesDirectory - JavaScript™)
Returns mail data for a specified person. .
Defined in
NotesDirectorySyntax
getMailInfo(username:string) : java.util.Vector
getMailInfo(username:string, getver:boolean,
errorOnMultipleMatches :boolean)
: java.util.Vector
Parameter | Description |
---|---|
username |
The name of the user for whom mail information is requested. |
getver |
If true, requests build number and version information of the user's home mail server. Defaults to false. |
errorOnMultipleMatches |
Indicate how to handle multiple matches for the user name. If true, throws an exception. If s false, uses the first match. Defaults to true. |
Return value | Description |
---|---|
java.util.Vector | The vector contains the following elements:
|
Usage
For directory lookups of mail information, the resident server specified for the directory class instance will be used, if present. If that fails, bootstrap information for the method will be gleaned from the user's current operating environment.If errorOnMultipleMatches is true, and multiple matches for the same name are found, the error code that is thrown is error code 4751 "Directory contains multiple entries for this user."
If no server responds to the lookup requests, the error code that is thrown is error code 4749 "Unable to access server."
If username was not found in the directory, the error code that is thrown is error code 4731 "User not found in Directory."
If the method fails for any other reason, the error code that is thrown is error code 4730 "GetMailInfo failed."
If getver is true and the specified person's home server is not available, BuildNumber and DominoVersion will be left blank.
Examples
This button gets mail information for the current user.var dir:NotesDirectory = session.getDirectory("tornado/UNIX/Notes");
var mailinfo = dir.getMailInfo(session.getUserName(), true, true);
requestScope.status = requestScope.status + "\nMail server: " + mailinfo[0];
requestScope.status = requestScope.status + "\nBuild number: " + mailinfo[1];
requestScope.status = requestScope.status + "\nDomino version: " + mailinfo[2];
requestScope.status = requestScope.status + "\nMail file: " + mailinfo[3];
requestScope.status = requestScope.status + "\nShort name: " + mailinfo[4];
requestScope.status = requestScope.status + "\nMail domain: " + mailinfo[5];
requestScope.status = requestScope.status + "\nUser name: " + mailinfo[6];
requestScope.status = requestScope.status + "\nInternet mail address: " + mailinfo[7];
requestScope.status = requestScope.status + "\nOut of office type: " +
(mailinfo[8] == 1 ? "Agent" : "Service");