MapiSetMessageRecipient Function

Action

Sets information about a message recipient. Getting the property value of MAPI_PROP_MSG_RECIPIENT_COUNT will retrieve the number of recipients. The recipient ID's are 0 based.

Include file

Mapi.bdh

Syntax

MapiSetMessageRecipient( in hMessage      : number,
                         in nRecipientID  : number, 
                         in sName         : string, 
                         in sAddress      : string, 
                         in nRecipientType: number ) : boolean;
Parameter Description
hMessageID Valid MAPI Message Handle
nRecipientID ID of the recipient that should be set. This needs to be a value between 0 and MAPI_PROP_MSG_RECIPIENT_COUNT-1. The ID is 0 based. So - the first recipient has ID 0 - the second one 1, …
sName Name of the Recipient
sAddress Address of the Recipient
nRecipientType
Type of recipient:
  • MAPI_MSG_RECIPTYPE_ORIG
  • MAPI_MSG_RECIPTYPE_TO
  • MAPI_MSG_RECIPTYPE_CC
  • MAPI_MSG_RECIPTYPE_BCC

Return value

  • true if successful
  • false otherwise

Example

See MAPI Sample