Skip to content

ResolveName - cMapiHandler

Transforms a message recipient's name as entered by a user to an unambiguous address list entry

Type: Function
Return Data Type: Integer

Parameters

Parameter Type Description
sToBeResolvedName String To be resolved name
iFlags Integer Flags can be iOr'ed ConstantMeaning

Syntax

Function ResolveName String sToBeResolvedName Integer iFlags Returns Integer

Call Example

Get ResolveName sToBeResolvedName iFlags to IntegerVariable

Description

The ResolveName function transforms a message recipient's name as entered by a user to an unambiguous address list entry. It is used to verify if an email address that can be found in the address book.

This function returns one of the following error codes if not successful:

Error Code Meaning
1 The user canceled one of the dialog boxes. The name was not resolved.
2 One or more unspecified errors occurred. No message was sent.
3 There was no default logon, and the user failed to log on successfully when the logon dialog box was displayed. No message was sent.
5 There was insufficient memory to proceed. No message was sent.
14 The recipient could not be resolved to any address. The recipient might not exist or might be unknown.
21 The recipient requested has not been or could not be resolved to a unique address list entry.
26 The operation was not supported by the underlying messaging system.

Example

Get ResolveName Of hoMapiSession sName 0 To iRetval
If (iRetval = SUCCESS_SUCCESS) Begin
    Get psResolvedName Of hoMapiSession To sReceiverName
    Get psResolvedAddress Of hoMapiSession To sReceiverAddress
    Get psResolvedEntryID Of hoMapiSession To sEntryId
    Get piResolvedEntryIDLength Of hoMapiSession To iLength
    Send DoAddReceiver Of hoMapiSession MAPI_TO sReceiverName sReceiverAddress sEntryId iLength
End
Else Begin
    // Retry with a dialog parameter, users can make corrections/selections.
    Get ResolveName Of hoMapiSession sName MAPI_DIALOG To iRetval
    If (iRetval = SUCCESS_SUCCESS) Begin

Return Value

Returns an error code if not successful