Platform SDK: SMTP Server Events

IMailMsgRecipientsAdd::AddPrimary

[This is preliminary documentation and subject to change.]

Add a recipient to the list. If the recipient is already in the list, that data is overwritten.

[local] HRESULT AddPrimary(
   [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 being added. This value should be the dimension of the arrays passed in ppszNames and pdwPropIDs.
ppszNames
An array of strings specifying 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.
S_FALSE Success. The recipient is a duplicate of one already in the list.

Remarks

See Also

IMailMsgRecipientsBase Interface

IMailMsgRecipientsAdd.AddSecondary