Recipients — Using the recipient table.
Recipients are used to specify the receiving entities for a specific message.
The structure of a recipient array in PHP is as follows. When recipients are set, you should use mapi_createoneoff() to create the right PR_ENTRYIDs:
Example 2.7. Recipient table
// Create array of recipients usable by the PHP MAPI functions $recipientarray = Array(Array(PR_ENTRYID => mapi_createoneoff("John Doe", "SMTP", "john@example.com"), PR_DISPLAY_NAME => "John Doe", PR_ADDRTYPE => "SMTP", PR_EMAIL_ADDRESS => "john@example.com" PR_RECIPIENT_TYPE => MAPI_TO), Array(PR_ENTRYID => mapi_createoneoff("Steve Ballmer", "SMTP", "ballmer@microsoft.com"), PR_DISPLAY_NAME => "Steve Ballmer", PR_ADDRTYPE => "SMTP", PR_EMAIL_ADDRESS => "ballmer@microsoft.com" PR_RECIPIENT_TYPE => MAPI_CC), Array(PR_ENTRYID => mapi_createoneoff("ConnecTUX", "SMTP", "info@connectux.com"), PR_DISPLAY_NAME => "ConnecTUX", PR_ADDRTYPE => "SMTP", PR_EMAIL_ADDRESS => "info@connectux.com" PR_RECIPIENT_TYPE => MAPI_BCC));
To set or get recipients, use the mapi_message_modifyrecipients and mapi_message_getrecipienttable methods.