Platform SDK: SMTP Server Events

IMailMsgRecipientsAdd::AddSecondary

[This is preliminary documentation and subject to change.]

Add a recipient to the list. If the recipient is already present in the list, the method will fail.

[local] HRESULT AddSecondary(
   [in] DWORD dwCount,
   [in,size_is(dwCount)] LPCSTR *ppszNames,
   [in,size_is(dwCount)] DWORD *pdwPropIDs,
   [out] DWORD *pdwIndex,
   [in,unique] IMailMsgRecipientsBase *pFrom,
   [in] DWORD dwFrom
);
dwCount
Specifies the number of recipients. This value should be the dimension of the arrays passed in ppszNames and pdwPropIDs.
ppszNames
Specifies the recipient names.
pdwPropIDs
Specifies the property ID's of the names. The property identifiers are defined in the IMMPID_RP_ENUM enumeration.
pdwIndex
Receives the zero-based index of the recipient. This index value is used to refer to the recipient in other methods.
pFrom
Specifies the recipient list from which to copy properties. If this value is NULL, then no properties will be copied.
dwFrom
Specifies the zero-based index of the recipient from which to copy properties. This value is ignored if pFrom is NULL.

Return Values

Value Description
S_OK Success.
MAILMSG_E_DUPLICATE Failure. The recipient is a duplicate of one already in the list.

See Also

IMailMsgRecipientsBase Interface

IMailMsgRecipientsAdd::AddSecondary