GetMailInfo (NotesDirectory - LotusScript®)

Returns Mail data for the specified person.

Note: This method is new with Release 8

Defined in

NotesDirectory

Syntax

mailinfo = notesDirectory .GetMailInfo( username [, getver ] [, errorOnMultipleMatches ])

Parameters

username

String. The name of a user for whom mail information is requested.

getver

Optional. Boolean. Flag to request build number and version information of the user's home mail server. Default value is False.

errorOnMultipleMatches

Optional. Boolean. Flag to indicate how to handle multiple matches for the username. If this argument is True, multiple matches throw an error code. If this argument is False, if multiple matches occur, the first match is used. Default value is True.

Return value

mailinfo

Variant containing a String array. Mail data for the specified person. Elements returned are as follows.

  • Mail Server - Home mail server for the specified person.
  • BuildNumber - If getver is true, a string representation of the build number of the specified person's mail server, for example, "303". If getver is false, "".
  • DominoVersion - If getver is true, a string representation of the Domino® version of the specified person's mail server, for example, "Build V80_07042006NP". If getver is false, "".
  • MailFile - Mail file for the specified person.
  • ShortName - Short form of the specified person's name.
  • MailDomain - Notes® Domain of the specified person's mail address.
  • User Name - First entry in the list of user names honored for the specified person.
  • InternetMailAddress - Internet mail address for the specified person.
  • OutOfOffice - Out of Office service type. "1" indicates Agent, "2" indicates Service.

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.

Example