MapiRecipientCollectionAdd Method (String, String, String, MapiRecipientType)

Adds the new recipient.

Namespace:  Aspose.Email.Mapi
Assembly:  Aspose.Email (in Aspose.Email.dll) Version: 21.3
Syntax
public void Add(
	string address,
	string addressType,
	string displayName,
	MapiRecipientType recipientType
)

Parameters

address
Type: SystemString
The mail address of recipient.
addressType
Type: SystemString
The type of address.
displayName
Type: SystemString
The display name of recipient.
recipientType
Type: Aspose.Email.MapiMapiRecipientType
Type of the recipient.
Exceptions
ExceptionCondition
ArgumentNullExceptionthrows if recipient address is null or empty.
ArgumentExceptionthrows if recipient address is not in a recognized format.
Remarks
When adding a new recepient, the value of either MapiMessage.DisplayTo or MapiMessage.DisplayBcc or MapiMessage.DisplayCC is also updated depending on the type of recepient.
See Also