com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class MapiRecipientCollection

  • All Implemented Interfaces:
    com.aspose.ms.System.Collections.Generic.IGenericCollection<MapiRecipient>, com.aspose.ms.System.Collections.Generic.IGenericEnumerable<MapiRecipient>, com.aspose.ms.System.Collections.Generic.IGenericList<MapiRecipient>, com.aspose.ms.System.Collections.IEnumerable<MapiRecipient>, Iterable<MapiRecipient>


    public class MapiRecipientCollection
    extends com.aspose.ms.System.Collections.ObjectModel.Collection<MapiRecipient>

    Represents a collection of MapiRecipient objects.

    • Constructor Summary

      Constructors 
      Constructor and Description
      MapiRecipientCollection()
      Initializes a new instance of the MapiRecipientCollection class.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void add(String address, String displayName, int recipientType)
      Adds the new recipient.
      void add(String address, String addressType, String displayName, int recipientType)
      Adds the new recipient.
      void addMapiRecipient(MapiRecipient item)
      Adds an object to the end of the T:System.Collections.ObjectModel.Collection`1.
      void insertMapiRecipient(int index, MapiRecipient item)
      Inserts an element into the T:System.Collections.ObjectModel.Collection`1 at the specified index.
      • Methods inherited from class com.aspose.ms.System.Collections.ObjectModel.Collection

        addItem, clear, containsItem, copyToTArray, get_Item, get_Items, getICollection, getIList, getSyncRoot, indexOfItem, insertItem, isReadOnly, iterator, removeAt, removeItem, set_Item, setItem, size
    • Constructor Detail

      • MapiRecipientCollection

        public MapiRecipientCollection()

        Initializes a new instance of the MapiRecipientCollection class.

    • Method Detail

      • add

        public void add(String address,
               String displayName,
               int recipientType)

        Adds the new recipient.

        Parameters:
        address - The mail address of recipient.
        displayName - The display name of recipient.
        recipientType - Type of the 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.

        Throws:
        com.aspose.ms.System.ArgumentNullException - throws if recipient address is null or empty.
        com.aspose.ms.System.ArgumentException - throws if recipient address is not in a recognized format.
      • add

        public void add(String address,
               String addressType,
               String displayName,
               int recipientType)

        Adds the new recipient.

        Parameters:
        address - The mail address of recipient.
        addressType - The type of address.
        displayName - The display name of recipient.
        recipientType - Type of the 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.

        Throws:
        com.aspose.ms.System.ArgumentNullException - throws if recipient address is null or empty.
        com.aspose.ms.System.ArgumentException - throws if recipient address is not in a recognized format.
      • addMapiRecipient

        public void addMapiRecipient(MapiRecipient item)

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

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

        public void insertMapiRecipient(int index,
                               MapiRecipient item)

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

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

        -or-

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