The MAPI_GetAddress() function retrieves an address from the specified address list.
MAPI_GetAddress(address_list_ID, index, mail_type, recipient_name, address {, address_type})
• address_list_ID – The ID of the address list from which an address will be retrieved.
• index – An integer specifying which address in the list to retrieve; 1 specifies the first address, 2 specifies the second, and so on.
• mail_type – A returned integer indicating how the message is to be sent to the recipient. The value corresponds to one of the following constants:
Constant |
Description |
---|---|
MAIL_TO |
Send the message directly to the recipient. |
MAIL_CC |
Send the message to the recipient as a carbon copy. |
MAIL_BCC |
Send the message to the recipient as a blind carbon copy. |
MAIL_REPLY_TO |
Send the message reply to the recipient. |
• recipient_name – A returned string containing the name of the recipient. The name can be up to 255 characters.
• address – A returned string containing the e-mail address of the recipient. The address can be up to 255 characters.
• address_type – An optional inout integer parameter that specifies the type of address to retrieve. The value corresponds to one of the following constants:
Constant |
Description |
---|---|
MAPI_ADDRESS_EXCHANGE |
The Exchange e-mail address is returned. |
MAPI_ADDRESS_SMTP |
The SMTP e-mail address is returned. |
MAPI_DEFAULT_ADDRESS |
The default format of the e-mail address is returned. The value of the address_type parameter will be set to the constant indicating the address type returned. |
A boolean. True indicates an address was retrieved, while false indicates it was not.