Platform SDK: SMTP Server Events

IMailMsgRecipientsAdd Interface

[This is preliminary documentation and subject to change.]

The IMailMsgRecipientsAdd interface defines methods used to add primary and secondary recipients to a recipient list of a message.

IID
4c28a700-a892-11d1-aa91-00aa006bc80b)
Extends
IMailMsgRecipientsBase

Methods

Method Description
AddPrimary Add a primary recipient (overwrite duplicates).
AddSecondary Add a secondary recipient (reject duplicates).

Remarks

When you call the IMailMsgRecipients::AllocNewList method on a MailMsg object, the object returns an IMailMsgRecipientsAdd reference on a separate object used to build a new recipient list for the message. The returned object has no recipients in the list to start. Therefore, to append recipients to the original list, you must first copy each recipient from the MailMsg object, and then add new ones. For each added recipient, you set the address value and obtain, upon successful completion, an index value. You subsequently use this value when setting or reading properties for the recipient through IMailMsgRecipients. When the new list has been constructed, you update the MailMsg object using the IMailMsgRecipients::WriteList method, passing the IMailMsgRecipientsAdd interface to the method.

The AddPrimary method can be used to either add a new recipient to the list or overwrite a recipient in the list with new information. The AddSecondary method is used to add a recipient, but will not allow a current recipient to be overwritten.

See Also

IMailMsgRecipientsBase

IMailMsgRecipients

IMailMsgRecipientsAdd