Recipients, like attachments, can be accessed through a table. You can open a message’s recipient table with the GetRecipientTable() method. Again, the columns are properties, but this time the rows are the recipients. Each recipient has a PR_DISPLAY_NAME (eg Joe Jones), a PR_EMAIL_ADDRESS (eg joe@jones.com) and a PR_RECIPIENT_TYPE (MAPI_TO, MAPI_CC, MAPI_BCC).
table = message.GetRecipientTable(0)
table.SetColumns([PR_DISPLAY_NAME, PR_EMAIL_ADDRESS], 0)
There are also some properties on the message that can be used to get a summary of the recipients. These are called PR_DISPLAY_TO, PR_DISPLAY_CC, PR_DISPLAY_BCC. They are simply PR_DISPLAY_NAME of all the recipients concatenated together. Since the properties are generated from the information in the recipient table, you cannot write these recipients.
If you wish to modify a row in the recipient table, you can do so with the ModifyRecipients() method:
message.ModifyRecipients(0, [ [
SPropValue(PR_DISPLAY_NAME, 'Joe'),
SPropValue(PR_EMAIL_ADDRESS, 'joe@domain'),
SPropValue(PR_RECIPIENT_TYPE, MAPI_TO) ] ])
The format of the passed recipients array is exactly the same as a set of rows returned by QueryRows(): an array of arrays of SPropValues.
This will replace the recipient table with the passed recipients. This allows you to add multiple recipients at once, or clear the recipient table (by passing 0 recipients). The PR_DISPLAY_* properties on the message will then automatically be updated.
Like properties, changes in the recipient table are not actually saved until the SaveChanges() method is called.