Syntax
MAPISetRecipientList(Recipients)
Remarks
Copies a recipient list with one or more recipients to the current outbound message. The function replaces the existing recipient list of the current outbound message. Use MAPISetRecipient to add one recipient to the current outbound message without removing existing recipients.
Use MAPIAddress to allow users to add users to a recipient list.
If any recipients within the recipient list are unresolved, MAPISendMail automatically attempts resolution when the message is sent. If all recipients cannot be resolved unambiguously, MAPISendMail returns an error.
Argument | Explanation |
Recipients | A handle to a recipient list |
Example
The following example displays the Mail Address Book dialog box, then copies the recipient list to a new message.
Sub MAIN MAPI_LOGON_UI = 1 Session = MAPILogon(0, "", "", MAPI_LOGON_UI, 0) RecipList = MAPIAddress(Session, 0, "Address Book", 4, "", 0, 0) If RecipList >= 0 Then result = MAPISetRecipientList(RecipList) MAPI_DIALOG = 8 result = MAPISendMail(Session, 0, "", "", MAPI_DIALOG, 0) End If result = MAPILogoff(Session, 0, 0, 0) End Sub