MapiRecipientCollection.Add

Add(string, string, MapiRecipientType)

Adds the new recipient.

public void Add(string address, string displayName, MapiRecipientType recipientType)
ParameterTypeDescription
addressStringThe mail address of recipient.
displayNameStringThe display name of recipient.
recipientTypeMapiRecipientTypeType 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


Add(string, string, string, MapiRecipientType)

Adds the new recipient.

public void Add(string address, string addressType, string displayName, 
    MapiRecipientType recipientType)
ParameterTypeDescription
addressStringThe mail address of recipient.
addressTypeStringThe type of address.
displayNameStringThe display name of recipient.
recipientTypeMapiRecipientTypeType 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


Add(MapiRecipient)

Adds an object to the end of the Collection.

public void Add(MapiRecipient item)
ParameterTypeDescription
itemMapiRecipientThe object to be added to the end of the Collection. The value can be null for reference types.

See Also