Aspose::Email::Mapi::MapiRecipientCollection Class Reference

Represents a collection of MapiRecipient objects. More...

Inherits Collection< System::SharedPtr< Aspose::Email::Mapi::MapiRecipient > >.

Public Member Functions

ASPOSE_EMAIL_SHARED_API MapiRecipientCollection ()
 Initializes a new instance of the MapiRecipientCollection class. More...
 
ASPOSE_EMAIL_SHARED_API MapiRecipientCollection (System::SharedPtr< MapiMessageItemBase > owner)
 Initializes a new instance of the MapiRecipientCollection class. More...
 
ASPOSE_EMAIL_SHARED_API void Add (System::String address, System::String displayName, MapiRecipientType recipientType)
 Adds the new recipient. More...
 
ASPOSE_EMAIL_SHARED_API void Add (System::String address, System::String addressType, System::String displayName, MapiRecipientType recipientType)
 Adds the new recipient. More...
 
ASPOSE_EMAIL_SHARED_API void Add (System::String address, System::String addressType, System::String displayName, MapiRecipientType recipientType, bool updateDisplayNames)
 Adds the new recipient. More...
 
ASPOSE_EMAIL_SHARED_API void Add (System::SharedPtr< MapiRecipient > const &item)
 Adds an object to the end of the T:System::Collections::ObjectModel::Collection`1. More...
 
ASPOSE_EMAIL_SHARED_API void Insert (int32_t index, System::SharedPtr< MapiRecipient > const &item)
 Inserts an element into the T:System::Collections::ObjectModel::Collection`1 at the specified index. More...
 
ASPOSE_EMAIL_SHARED_API bool ContainsAddress (System::String address, MapiRecipientType recType)
 
ASPOSE_EMAIL_SHARED_API void DeepCopyTo (System::SharedPtr< MapiRecipientCollection > dest)
 

Protected Member Functions

virtual ASPOSE_EMAIL_SHARED_API ~MapiRecipientCollection ()
 

Friends

class Aspose::Email::Mapi::MapiMessageItemBase
 
class Aspose::Email::Mapi::MapiRecipientCollectionFactory
 
class Aspose::Email::Mapi::MapiMessage
 

Detailed Description

Represents a collection of MapiRecipient objects.

Constructor & Destructor Documentation

◆ MapiRecipientCollection() [1/2]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Mapi::MapiRecipientCollection::MapiRecipientCollection ( )

Initializes a new instance of the MapiRecipientCollection class.

◆ MapiRecipientCollection() [2/2]

ASPOSE_EMAIL_SHARED_API Aspose::Email::Mapi::MapiRecipientCollection::MapiRecipientCollection ( System::SharedPtr< MapiMessageItemBase owner)

Initializes a new instance of the MapiRecipientCollection class.

Parameters
ownerThe owner message.

◆ ~MapiRecipientCollection()

virtual ASPOSE_EMAIL_SHARED_API Aspose::Email::Mapi::MapiRecipientCollection::~MapiRecipientCollection ( )
protectedvirtual

Member Function Documentation

◆ Add() [1/4]

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Mapi::MapiRecipientCollection::Add ( System::SharedPtr< MapiRecipient > const &  item)

Adds an object to the end of the T:System::Collections::ObjectModel::Collection`1.

Parameters
itemThe object to be added to the end of the T:System::Collections::ObjectModel::Collection`1. The value can be null for reference types.

◆ Add() [2/4]

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Mapi::MapiRecipientCollection::Add ( System::String  address,
System::String  addressType,
System::String  displayName,
MapiRecipientType  recipientType 
)

Adds the new recipient.

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.

Parameters
addressThe mail address of recipient.
addressTypeThe type of address.
displayNameThe display name of recipient.
recipientTypeType of the recipient.
Exceptions
ArgumentNullExceptionthrows if recipient address is null or empty.
ArgumentExceptionthrows if recipient address is not in a recognized format.

◆ Add() [3/4]

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Mapi::MapiRecipientCollection::Add ( System::String  address,
System::String  addressType,
System::String  displayName,
MapiRecipientType  recipientType,
bool  updateDisplayNames 
)

Adds the new recipient.

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.

Parameters
addressThe mail address of recipient.
addressTypeThe type of address.
displayNameThe display name of recipient.
recipientTypeType of the recipient.
updateDisplayNamesThe DisplayNames will be updated if true.
Exceptions
ArgumentNullExceptionthrows if recipient address is null or empty.
ArgumentExceptionthrows if recipient address is not in a recognized format.

◆ Add() [4/4]

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Mapi::MapiRecipientCollection::Add ( System::String  address,
System::String  displayName,
MapiRecipientType  recipientType 
)

Adds the new recipient.

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.

Parameters
addressThe mail address of recipient.
displayNameThe display name of recipient.
recipientTypeType of the recipient.
Exceptions
ArgumentNullExceptionthrows if recipient address is null or empty.
ArgumentExceptionthrows if recipient address is not in a recognized format.

◆ ContainsAddress()

ASPOSE_EMAIL_SHARED_API bool Aspose::Email::Mapi::MapiRecipientCollection::ContainsAddress ( System::String  address,
MapiRecipientType  recType 
)

◆ DeepCopyTo()

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Mapi::MapiRecipientCollection::DeepCopyTo ( System::SharedPtr< MapiRecipientCollection dest)

◆ Insert()

ASPOSE_EMAIL_SHARED_API void Aspose::Email::Mapi::MapiRecipientCollection::Insert ( int32_t  index,
System::SharedPtr< MapiRecipient > const &  item 
)

Inserts an element into the T:System::Collections::ObjectModel::Collection`1 at the specified index.

Parameters
indexThe zero-based index at which item should be inserted.
itemThe object to insert. The value can be null for reference types.
Exceptions
T:System::ArgumentOutOfRangeExceptionindex is less than zero.

-or-

index is greater than P:System::Collections::ObjectModel::Collection`1::Count.

Friends And Related Function Documentation

◆ Aspose::Email::Mapi::MapiMessage

friend class Aspose::Email::Mapi::MapiMessage
friend

◆ Aspose::Email::Mapi::MapiMessageItemBase

◆ Aspose::Email::Mapi::MapiRecipientCollectionFactory

friend class Aspose::Email::Mapi::MapiRecipientCollectionFactory
friend