com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Interface IEWSClient

    • Method Detail

      • getUseDateInLogFileName

        boolean getUseDateInLogFileName()

        Gets or sets value which indicates if date has to be used in log file name.

      • setUseDateInLogFileName

        void setUseDateInLogFileName(boolean value)

        Gets or sets value which indicates if date has to be used in log file name.

      • getLogFileName

        String getLogFileName()

        Gets or sets log file name

      • setLogFileName

        void setLogFileName(String value)

        Gets or sets log file name

      • getTimezoneId

        String getTimezoneId()

        Gets or sets timezone id

      • setTimezoneId

        void setTimezoneId(String value)

        Gets or sets timezone id

      • getCurrentCalendarFolderUri

        String getCurrentCalendarFolderUri()

        Gets or sets current calendar folder uri

      • setCurrentCalendarFolderUri

        void setCurrentCalendarFolderUri(String value)

        Gets or sets current calendar folder uri

      • getEnableDecompression

        boolean getEnableDecompression()

        Gets or sets a value that indicates whether decompression is enabled

      • setEnableDecompression

        void setEnableDecompression(boolean value)

        Gets or sets a value that indicates whether decompression is enabled

      • getUseSlashAsFolderSeparator

        boolean getUseSlashAsFolderSeparator()

        Gets or sets value that determines whether the slash '/' is used as folder separator.

      • setUseSlashAsFolderSeparator

        void setUseSlashAsFolderSeparator(boolean value)

        Gets or sets value that determines whether the slash '/' is used as folder separator.

      • listMessages

        ExchangeMessageInfoCollection listMessages(String folder,
                                                 boolean recursive)

        List the messages in the specified folder

        Parameters:
        folder - A folder to search messages in
        recursive - Indicates whether recursive listing or not
        Returns:
        ExchangeMessageInfoCollection that contains messages from the specified folder
      • listMessages

        @Deprecated
        ExchangeMessageInfoCollection listMessages(String folder,
                                                            int options,
                                                            Iterable<String> extendedProperties)
        Deprecated. This class member is obsolete and will be removed soon, please don't use it anymore.

        List the messages in the specified folder

        Parameters:
        folder - A folder to search messages in
        options - Specifies the settings of listing
        extendedProperties - Extended properties of retrieved messages
        Returns:
        ExchangeMessageInfoCollection that contains messages from the specified folder
      • listMessagesByPropertyDescriptor

        ExchangeMessageInfoCollection listMessagesByPropertyDescriptor(String folder,
                                                                     int options,
                                                                     Iterable<PropertyDescriptor> extendedProperties)

        List the messages in the specified folder

        Parameters:
        folder - A folder to search messages in
        options - Specifies the settings of listing
        extendedProperties - Extended properties of retrieved messages
        Returns:
        ExchangeMessageInfoCollection that contains messages from the specified folder
      • listMessages

        ExchangeMessageInfoCollection listMessages(String folder,
                                                 int maxNumberOfMessages,
                                                 MailQuery query,
                                                 boolean recursive)

        List the messages in the specified folder.

        Parameters:
        folder - A folder to search messages in.
        maxNumberOfMessages - Maximum number of messages.
        query - MailQuery that represents message search criteria.
        recursive - Indicates whether recursive listing or not.
        Returns:
        ExchangeMessageInfoCollection that contains messages from the specified folder.
      • moveItem

        String moveItem(String itemUri,
                      String destinationFolderUri)

        Moves the item to specified folder

        Parameters:
        itemUri - The item URI
        destinationFolderUri - The destination folder URI
        Returns:
        An uri of the moved message
      • send

        void send(String from,
                String to,
                String subject,
                String body)

        Sends the specified message

        Parameters:
        from - From address
        to - To address
        subject - The subject of message
        body - The body of message
      • deleteFolder

        void deleteFolder(String folderUri,
                        boolean deletePermanently)

        Deletes the folder

        Parameters:
        folderUri - The folder Uri
        deletePermanently - Indicates whether the folder should be deleted permanently or should be moved into DeletedItems folder
      • findMessages

        @Deprecated
        ExchangeMessageInfoCollection findMessages(String uri)
        Deprecated. 

        Gets the collection of messages from specified folder

        Parameters:
        uri - The URI of folder


        To retrieve messages faster, please, use ListMessages method. But note that ListMessages method doesn't return sender's and recipient's address in ExchangeMessageInfo object.

        Returns:
        ExchangeMessageInfoCollection that contains messages from the specified folder
      • getExchangeType

        int getExchangeType()

        Gets the information about the current version of MS Exchange.

        Returns:
        Returns Exchange server version
      • getServerVersion

        int getServerVersion()

        Gets the information about the current version of MS Exchange.

      • setReadFlag

        void setReadFlag(String messageUri,
                       boolean isRead)

        Marks the specifeid message as read.

        Parameters:
        messageUri - A message uri.
        isRead - A value indicating whether the message was read
        Throws:
        AsposeArgumentException - messageUri is null or empty.
      • deleteUserConfiguration

        void deleteUserConfiguration(UserConfigurationName userConfigurationName)

        Deletes the specified user configuration

        Parameters:
        userConfigurationName - Specifies a user configuration to delete
        Throws:
        AsposeArgumentNullException - throws when userConfigurationName is null
      • createInboxRule

        void createInboxRule(InboxRule rule)

        Creates the specified inbox rule

        Parameters:
        rule - A inbox rule to create
        Throws:
        AsposeArgumentNullException - throws when rule is null
      • createInboxRule

        void createInboxRule(InboxRule rule,
                           String mailbox)

        Creates the specified inbox rule

        Parameters:
        rule - A inbox rule to create
        mailbox - A mailbox to create rule for. Note: if it is set to null or empty, the rule will be created in the default mailbox
        Throws:
        AsposeArgumentNullException - throws when rule is null
      • updateInboxRule

        void updateInboxRule(InboxRule rule)

        Updates the specified inbox rule

        Parameters:
        rule - A inbox rule to update
        Throws:
        AsposeArgumentNullException - throws when rule is null
      • updateInboxRule

        void updateInboxRule(InboxRule rule,
                           String mailbox)

        Updates the specified inbox rule

        Parameters:
        rule - A inbox rule to update
        mailbox - A mailbox where rule is located. Note: if it is set to null or empty, the rule will be searched in the default mailbox
        Throws:
        AsposeArgumentNullException - throws when rule is null
      • deleteInboxRule

        void deleteInboxRule(String ruleId)

        Deletes the specified inbox rule

        Parameters:
        ruleId - An id of inbox rule to delete
        Throws:
        AsposeArgumentException - throws when ruleId is null or empty
      • deleteInboxRule

        void deleteInboxRule(String ruleId,
                           String mailbox)

        Deletes the specified inbox rule

        Parameters:
        ruleId - An id of inbox rule to delete
        mailbox - A mailbox where rule is located. Note: if it is set to null or empty, the rule will be searched in the default mailbox
        Throws:
        AsposeArgumentException - throws when ruleId is null or empty
      • getInboxRules

        InboxRule[] getInboxRules()

        Gets inbox rules

        Returns:
        An array of InboxRule
      • getInboxRules

        InboxRule[] getInboxRules(String mailbox)

        Gets inbox rules

        Parameters:
        mailbox - A mailbox to read inbox rule from. Note: if it is set to null or empty, the rules will be read from the default mailbox
        Returns:
        An array of InboxRule
      • deleteConversationItems

        void deleteConversationItems(String conversationId)

        Deletes all items of the specified conversation

        Parameters:
        conversationId - Id of conversation to delete
        Throws:
        AsposeArgumentException - conversationId is null or empty
      • deleteConversationItems

        void deleteConversationItems(String conversationId,
                                   String contextFolderId)

        Deletes the conversation items, which are located in the specified folder

        Parameters:
        conversationId - Id of conversation to delete
        contextFolderId - Id of folder in which delete conversation items. Note: If it's set to null(or empty), all conversation items will be deleted
        Throws:
        AsposeArgumentException - conversationId is null or empty
      • moveConversationItems

        void moveConversationItems(String conversationId,
                                 String destinationFolderId)

        Moves the conversation items into the specified target folder

        Parameters:
        conversationId - Id of conversation to delete
        destinationFolderId - Id of folder into which move items
        Throws:
        AsposeArgumentException - conversationId is null or empty
        AsposeArgumentException - destinationFolderId is null or empty
      • moveConversationItems

        void moveConversationItems(String conversationId,
                                 String contextFolderId,
                                 String destinationFolderId)

        Moves the conversation items, which are located in the specified folder, into the specified target folder

        Parameters:
        conversationId - Id of conversation to move
        contextFolderId - Id of folder from which move conversation items. Note: If it's set to null(or empty), all conversation items will be moved
        destinationFolderId - Id of folder into which move items
        Throws:
        AsposeArgumentException - conversationId is null or empty
        AsposeArgumentException - destinationFolderId is null or empty
      • copyConversationItems

        void copyConversationItems(String conversationId,
                                 String destinationFolderId)

        Copies the conversation items into the specified target folder

        Parameters:
        conversationId - Id of conversation to copy
        destinationFolderId - Id of folder into which copy items
        Throws:
        AsposeArgumentException - conversationId is null or empty
        AsposeArgumentException - destinationFolderId is null or empty
      • copyConversationItems

        void copyConversationItems(String conversationId,
                                 String contextFolderId,
                                 String destinationFolderId)

        Copies the conversation items, which are located in the specified folder, into the specified target folder

        Parameters:
        conversationId - Id of conversation to copy
        contextFolderId - Id of folder in which conversation items are located. Note: If it's set to null(or empty), all conversation items will be copied
        destinationFolderId - Id of folder into which copy items
        Throws:
        AsposeArgumentException - conversationId is null or empty
        AsposeArgumentException - destinationFolderId is null or empty
      • setConversationReadState

        void setConversationReadState(String conversationId,
                                    boolean isRead)

        Set read state of the conversation items to the specified value

        Parameters:
        conversationId - Id of conversation to be changed
        isRead - A flag that enables setting the read state of items in a conversation.
        Throws:
        AsposeArgumentException - conversationId is null or empty
      • setConversationReadState

        void setConversationReadState(String conversationId,
                                    String contextFolderId,
                                    boolean isRead)

        Set read state of the conversation items, which are located in the specified folder, to the specified value

        Parameters:
        conversationId - Id of conversation to be changed
        contextFolderId - Id of folder in which conversation items are located. Note: If it's set to null(or empty), all conversation items will be copied
        isRead - A flag that enables setting the read state of items in a conversation.
        Throws:
        AsposeArgumentException - conversationId is null or empty
      • copyItem

        String copyItem(String itemUri,
                      String destinationFolderUri)

        Copies the item to specified folder

        Parameters:
        itemUri - The item URI
        destinationFolderUri - The destination folder URI
        Returns:
        An uri of the copied message
        Throws:
        AsposeArgumentException - itemUri is null or empty
        AsposeArgumentException - destinationFolderUri is null or empty
      • emptyFolder

        void emptyFolder(String folderUri)

        Empties the specified folder. Subfolders will not be deleted; deleted items will be moved into DeletedItems folder

        Parameters:
        folderUri - Specifies the folder to be empty
        Throws:
        ExchangeException - EmptyFolder operation failed
        AsposeArgumentException - folderUri is null or empty
      • emptyFolder

        void emptyFolder(String folderUri,
                       int options)

        Empties the specified folder

        Parameters:
        folderUri - Specifies the folder to be empty
        options - Specifies the options of clearing folder
        Throws:
        ExchangeException - EmptyFolder operation failed
        AsposeArgumentException - folderUri is null or empty
      • createPublicFolder

        ExchangeFolderInfo createPublicFolder(String name,
                                            ExchangeFolderPermissionCollection permissions)

        Creates the specified public folder in the root public folder

        Parameters:
        name - A name of new folder
        permissions - A permission on new folder
        Returns:
        Returns folder information
      • createPublicFolder

        ExchangeFolderInfo createPublicFolder(String parentFolderUri,
                                            String name,
                                            ExchangeFolderPermissionCollection permissions)

        Creates the specified public folder in the root public folder

        Parameters:
        parentFolderUri - The URI of parent folder
        name - A name of new folder
        permissions - A permission on new folder
        Returns:
        Returns folder information
      • createPublicFolder

        ExchangeFolderInfo createPublicFolder(String name,
                                            ExchangeFolderPermissionCollection permissions,
                                            int folderType)

        Creates the specified public folder in the root public folder

        Parameters:
        name - A name of new folder
        permissions - A permission on new folder
        folderType - Type of folder
        Returns:
        Returns folder information
      • mailEnablePublicFolder

        void mailEnablePublicFolder(String folderUri)

        Mail-enable a public folder

        Parameters:
        folderUri - A folder uri
        Throws:
        AsposeArgumentException - folderUri is null or empty
      • mailDisablePublicFolder

        void mailDisablePublicFolder(String folderUri)

        Mail-disable a public folder

        Parameters:
        folderUri - A folder uri
        Throws:
        AsposeArgumentException - folderUri is null or empty
      • impersonateUser

        void impersonateUser(int valueType,
                           String value)

        Impersonates the user.

        Parameters:
        valueType - The ItemChoiceType enumeration value to use for impersonation.
        value - The item name.
      • resetImpersonation

        void resetImpersonation()

        Makes the impersonation reset.

      • delegateAccess

        void delegateAccess(String delegateSmtpAddress,
                          int permissionLevel,
                          String mailbox)

        Delegates access on the principal mailbox to the specified user.

        Parameters:
        delegateSmtpAddress - A primary smtp address of user.
        permissionLevel - A permission level that is granted to the user on all folders.
        mailbox - A mailbox to grant access on.
        Throws:
        AsposeArgumentException - delegateSmtpAddress or mailbox is null or empty.
      • updateDelegate

        void updateDelegate(ExchangeDelegateUser delegateUser,
                          String mailbox)

        Updates the delegate user settings who is granted access on the specified mailbox.

        Parameters:
        delegateUser - A new settings of delegate user.
        mailbox - A mailbox on which the delegate user is granted access.
        Throws:
        AsposeArgumentNullException - delegateUser is null.
        AsposeArgumentException - mailbox is null or empty.
      • closeAccess

        void closeAccess(String delegateSmtpAddress,
                       String mailbox)

        Closes access on the specified mailbox for the specified user.

        Parameters:
        delegateSmtpAddress - A primary smtp address of delegate user.
        mailbox - A mailbox.
        Throws:
        AsposeArgumentException - delegateSmtpAddress or mailbox is null or empty.
      • deleteFolders

        void deleteFolders(com.aspose.ms.System.Collections.Specialized.StringCollection folderUris)

        Deletes the specified folders

        Parameters:
        folderUris - The folder uris
        Throws:
        AsposeArgumentNullException - folderUris is null
      • deleteFolders

        void deleteFolders(com.aspose.ms.System.Collections.Specialized.StringCollection folderUris,
                         boolean deletePermanently)

        Deletes the folder

        Parameters:
        folderUris - The folder Uri
        deletePermanently - Indicates whether the folder should be deleted permanently or should be moved into DeletedItems folder
        Throws:
        AsposeArgumentNullException - folderUris is null
      • checkUserAvailability

        ExchangeUserAvailability checkUserAvailability(String user,
                                                     DateRange timeWindow)

        Checks user availability within the specified time window.

        Parameters:
        user - An user smtp address.
        timeWindow - A time span for the queried user's availability.
        Returns:
        ExchangeUserAvailability containing user availability information.
      • fetchAppointment

        Appointment fetchAppointment(String appointmentUri)

        Fetch the specified appointment from server.

        Parameters:
        appointmentUri - An uri of appointment to be fetched.
        Returns:
        A fetched Appointment.
        Throws:
        AsposeArgumentException - appointmentUri is null or empty.
      • fetchAppointment

        Appointment fetchAppointment(String appointmentUri,
                                   String folderUri)

        Fetch the specified appointment from server.

        Parameters:
        appointmentUri - An uri of appointment to be fetched.
        folderUri - An uri of appointments parent folder.
        Returns:
        A fetched Appointment.
        Throws:
        AsposeArgumentException - appointmentUri is null or empty.
      • createFolder

        ExchangeFolderInfo createFolder(String name)

        Creates new folder in the root folder.

        Parameters:
        name - The name of new folder
        Returns:
        Returns folder information
      • createFolder

        ExchangeFolderInfo createFolder(String parentFolderUri,
                                      String name)

        Creates the new folder with the specified name in the specified parent folder.

        Parameters:
        parentFolderUri - An uri of parent folder.
        name - A name of folder to be created.
        Throws:
        AsposeArgumentException - parentFolderUri or name is null or empty.
      • createFolder

        ExchangeFolderInfo createFolder(String parentFolderUri,
                                      String name,
                                      ExchangeFolderPermissionCollection permissions,
                                      String folderClass)

        Creates the new folder

        Parameters:
        parentFolderUri - The URI of parent folder
        name - The name of new folder
        permissions - A permission on new folder
        folderClass - The class of new folder
        Returns:
        Returns folder information
      • createFolder

        ExchangeFolderInfo createFolder(String name,
                                      int folderType)

        Creates new folder in the root folder.

        Parameters:
        name - The name of new folder
        folderType - Type of folder
        Returns:
        Returns folder information
      • createFolder

        ExchangeFolderInfo createFolder(String parentFolderUri,
                                      String name,
                                      int folderType)

        Creates the new folder

        Parameters:
        parentFolderUri - The URI of parent folder
        name - The name of new folder
        folderType - Type of folder
        Returns:
        Returns folder information
      • getRootFolderEventFilter

        int getRootFolderEventFilter()

        Specifies event types for Root folder

      • setRootFolderEventFilter

        void setRootFolderEventFilter(int value)

        Specifies event types for Root folder

      • getCalendarFolderEventFilter

        int getCalendarFolderEventFilter()

        Specifies event types for Calendar folder

      • setCalendarFolderEventFilter

        void setCalendarFolderEventFilter(int value)

        Specifies event types for Calendar folder

      • getContactsFolderEventFilter

        int getContactsFolderEventFilter()

        Specifies event types for Contacts folder

      • setContactsFolderEventFilter

        void setContactsFolderEventFilter(int value)

        Specifies event types for Contacts folder

      • getDeletedItemsFolderEventFilter

        int getDeletedItemsFolderEventFilter()

        Specifies event types for DeletedItems folder

      • setDeletedItemsFolderEventFilter

        void setDeletedItemsFolderEventFilter(int value)

        Specifies event types for DeletedItems folder

      • getDraftsFolderEventFilter

        int getDraftsFolderEventFilter()

        Specifies event types for Drafts folder

      • setDraftsFolderEventFilter

        void setDraftsFolderEventFilter(int value)

        Specifies event types for Drafts folder

      • getInboxFolderEventFilter

        int getInboxFolderEventFilter()

        Specifies event types for Inbox folder

      • setInboxFolderEventFilter

        void setInboxFolderEventFilter(int value)

        Specifies event types for Inbox folder

      • getJournalFolderEventFilter

        int getJournalFolderEventFilter()

        Specifies event types for Journal folder

      • setJournalFolderEventFilter

        void setJournalFolderEventFilter(int value)

        Specifies event types for Journal folder

      • getNotesFolderEventFilter

        int getNotesFolderEventFilter()

        Specifies event types for Notes folder

      • setNotesFolderEventFilter

        void setNotesFolderEventFilter(int value)

        Specifies event types for Notes folder

      • getOutboxFolderEventFilter

        int getOutboxFolderEventFilter()

        Specifies event types for Outbox folder

      • setOutboxFolderEventFilter

        void setOutboxFolderEventFilter(int value)

        Specifies event types for Outbox folder

      • getSentItemsFolderEventFilter

        int getSentItemsFolderEventFilter()

        Specifies event types for SentItems folder

      • setSentItemsFolderEventFilter

        void setSentItemsFolderEventFilter(int value)

        Specifies event types for SentItems folder

      • getTasksFolderEventFilter

        int getTasksFolderEventFilter()

        Specifies event types for Tasks folder

      • setTasksFolderEventFilter

        void setTasksFolderEventFilter(int value)

        Specifies event types for Tasks folder

      • getNotificationTimeout

        int getNotificationTimeout()

        Defines timeout for server notifications

      • setNotificationTimeout

        void setNotificationTimeout(int value)

        Defines timeout for server notifications

      • getNotificationsCheckInterval

        int getNotificationsCheckInterval()

        Defines interval for notification check

      • setNotificationsCheckInterval

        void setNotificationsCheckInterval(int value)

        Defines interval for notification check

      • updateSubscription

        void updateSubscription()

        Updates subscriptions

      • resetSubscription

        void resetSubscription()

        Reset all subscriptions

      • listAppointments

        Appointment[] listAppointments()

        Retrieves list of appointments for default calendar folder

        Returns:
        Returns array of appointments
      • listAppointments

        Appointment[] listAppointments(String folderUri)

        Retrieves list of appointments for specified calendar folder

        Parameters:
        folderUri - A folder to search appointments in.
        Returns:
        Returns array of appointments
      • listAppointments

        Appointment[] listAppointments(String folderUri,
                                     boolean recursive)

        Retrieves list of appointments for specified calendar folder

        Parameters:
        folderUri - A folder to search appointments in.
        recursive - Indicates whether recursive listing or not.
        Returns:
        Returns array of appointments
      • listAppointments

        Appointment[] listAppointments(boolean recursive)

        Retrieves list of appointments for default calendar folder

        Parameters:
        recursive - Indicates whether recursive listing or not.
        Returns:
        Returns array of appointments
      • listAppointments

        Appointment[] listAppointments(MailQuery query)

        Retrieves list of appointments for default calendar folder

        Parameters:
        query - MailQuery that represents appointments search criteria.
        Returns:
        Returns array of appointments
      • listAppointments

        Appointment[] listAppointments(String folderUri,
                                     MailQuery query)

        Retrieves list of appointments for specified calendar folder

        Parameters:
        folderUri - A folder to search appointments in.
        query - MailQuery that represents appointments search criteria.
        Returns:
        Returns array of appointments
      • listAppointments

        Appointment[] listAppointments(MailQuery query,
                                     boolean recursive)

        Retrieves list of appointments for default calendar folder

        Parameters:
        query - MailQuery that represents appointments search criteria.
        recursive - Indicates whether recursive listing or not.
        Returns:
        Returns array of appointments
      • listAppointments

        Appointment[] listAppointments(String folderUri,
                                     MailQuery query,
                                     boolean recursive)

        Retrieves list of appointments for specified calendar folder

        Parameters:
        folderUri - A folder to search appointments in.
        query - MailQuery that represents appointments search criteria.
        recursive - Indicates whether recursive listing or not.
        Returns:
        Returns array of appointments
      • createAppointment

        String createAppointment(Appointment appointment)

        Creates appointment.

        Parameters:
        appointment - Calendar appointment.
        Returns:
        Returns appointment UID
      • createAppointment

        String createAppointment(Appointment appointment,
                               String folderUri)

        Creates appointment.

        Parameters:
        appointment - Calendar appointment.
        folderUri - An uri of appointments parent folder.
        Returns:
        Returns appointment UID
      • createAppointment

        String createAppointment(MapiCalendar appointment)

        Creates appointment.

        Parameters:
        appointment - Calendar appointment.
        Returns:
        Returns appointment UID
      • createAppointment

        String createAppointment(MapiCalendar appointment,
                               String folderUri)

        Creates appointment.

        Parameters:
        appointment - Calendar appointment.
        folderUri - An uri of appointments parent folder.
        Returns:
        Returns PidLidGlobalObjectId as base64 string
      • updateAppointment

        void updateAppointment(MapiCalendar appointment)

        Updates appointment.

        Parameters:
        appointment - Calendar appointment.
      • updateAppointment

        void updateAppointment(MapiCalendar appointment,
                             String folderUri)

        Updates appointment.

        Parameters:
        appointment - Calendar appointment.
        folderUri - An uri of appointments parent folder.
      • updateAppointment

        void updateAppointment(Appointment appointment)

        Updates appointment.

        Parameters:
        appointment - Calendar appointment.
      • updateAppointment

        void updateAppointment(Appointment appointment,
                             String folderUri)

        Updates appointment.

        Parameters:
        appointment - Calendar appointment.
        folderUri - An uri of appointments parent folder.
      • cancelAppointment

        void cancelAppointment(MapiCalendar appointment)

        Cancels appointment.

        Parameters:
        appointment - Calendar appointment.
      • cancelAppointment

        void cancelAppointment(MapiCalendar appointment,
                             String folderUri)

        Cancels appointment.

        Parameters:
        appointment - Calendar appointment.
        folderUri - An uri of appointments parent folder.
      • cancelAppointment

        void cancelAppointment(Appointment appointment)

        Cancels appointment.

        Parameters:
        appointment - Calendar appointment.
      • cancelAppointment

        void cancelAppointment(Appointment appointment,
                             String folderUri)

        Cancels appointment.

        Parameters:
        appointment - Calendar appointment.
        folderUri - An uri of appointments parent folder.
      • cancelAppointment

        void cancelAppointment(String uniqueId)

        Cancels an exiting meeting on an organizers calendar

        Parameters:
        uniqueId - Unique identifier
      • cancelAppointment

        void cancelAppointment(String uniqueId,
                             String folderUri)

        Cancels an exiting meeting on an organizers calendar

        Parameters:
        uniqueId - Unique identifier
        folderUri - An uri of appointments parent folder.
      • getUMConfiguration

        UnifiedMessagingConfiguration getUMConfiguration()

        Retrieves unified messaging configuration

        Returns:
        Returns unified messaging configuration
      • playOnPhone

        String playOnPhone(String messageId,
                         String dialString)

        The PlayOnPhone operation initiates an outbound call and plays a message over the telephone.

        Parameters:
        messageId - Specifies message id.
        dialString - Specifies telephone to play message.
        Returns:
        Returns phone call id
      • disconnectPhoneCall

        void disconnectPhoneCall(String callId)

        Disconnects a phone call specified by id.

        Parameters:
        callId - Phone call id.
      • getCallInfo

        CallInformation getCallInfo(String callId)

        Retrieves phone call information by call id

        Parameters:
        callId - call id
        Returns:
        Returns phone call information object
      • getServerTimeZoneIds

        String[] getServerTimeZoneIds()

        The GetServerTimeZoneIds returns information from time zone id that are available on an Exchange server.

        Returns:
        Returns an array of time zone id that are available on an Exchange server.
      • getServerTimeZoneIds

        String[] getServerTimeZoneIds(String... timeZoneIds)

        The GetServerTimeZoneIds returns information from time zone id that are available on an Exchange server.

        Parameters:
        timeZoneIds - Identifiers of time zones for checking existence on the server.
        Returns:
        Returns an array of time zone id that are available on an Exchange server.
      • getServerTimeZoneIds

        String[] getServerTimeZoneIds(Iterable<String> timeZoneIds)

        The GetServerTimeZoneIds returns information from time zone id that are available on an Exchange server.

        Parameters:
        timeZoneIds - Identifiers of time zones for checking existence on the server.
        Returns:
        Returns an array of time zone id that are available on an Exchange server.
      • markAsJunk

        String[] markAsJunk(boolean isJunk,
                          String... messageUriEn)

        The MarkAsJunk method moves mail messages to the junk mail folder and blocks message sender.

        Parameters:
        isJunk - Indicates, whether messages is marked as junk mail. If value of true adds message sender to the block-list. If value of false removes message sender from the block-list.
        messageUriEn - Array of message uri
        Returns:
        Returns the array of message ID which are moved to the junk mail folder.
      • markAsJunk

        String[] markAsJunk(boolean isJunk,
                          boolean moveItem,
                          String... messageUriEn)

        The MarkAsJunk method moves mail messages to the junk mail folder and blocks message sender.

        Parameters:
        isJunk - Indicates, whether messages is marked as junk mail. If value of true adds message sender to the block-list. If value of false removes message sender from the block-list.
        moveItem - Indicates, whether messages is moved to the junk mail folder.
        messageUriEn - Array of message uri
        Returns:
        Returns the array of message ID which are moved to the junk mail folder.
      • markAsJunk

        String[] markAsJunk(boolean isJunk,
                          Iterable<String> messageUriEn)

        The MarkAsJunk method moves mail messages to the junk mail folder and blocks message sender.

        Parameters:
        isJunk - Indicates, whether messages is marked as junk mail. If value of true adds message sender to the block-list. If value of false removes message sender from the block-list.
        messageUriEn - Enumeration of message uri
        Returns:
        Returns the item ID of the message marked as junk mail.
      • markAsJunk

        String[] markAsJunk(boolean isJunk,
                          boolean moveItem,
                          Iterable<String> messageUriEn)

        The MarkAsJunk method moves mail messages to the junk mail folder and blocks message sender.

        Parameters:
        isJunk - Indicates, whether messages is marked as junk mail. If value of true adds message sender to the block-list. If value of false removes message sender from the block-list.
        moveItem - Indicates, whether messages is moved to the junk mail folder.
        messageUriEn - Enumeration of message uri
        Returns:
        Returns the array of message ID which are moved to the junk mail folder.
      • markAsJunk

        void markAsJunk(boolean isJunk,
                      boolean moveItem,
                      Iterable<String> messageUriEn,
                      String[][] movedMessageIds,
                      String[][] failedMessageIds,
                      String[][] errorMessages)

        The MarkAsJunk method moves mail messages to the junk mail folder and blocks message sender.

        Parameters:
        isJunk - Indicates, whether messages is marked as junk mail. If value of true adds message sender to the block-list. If value of false removes message sender from the block-list.
        moveItem - Indicates, whether messages is moved to the junk mail folder.
        messageUriEn - Enumeration of message uri
        movedMessageIds - Returns the array of message ID which are moved to the junk mail folder.
        failedMessageIds - Returns the array of message ID which haven't been moved to the junk mail folder.
        errorMessages - Error messages for failed operations
      • markAllItemsAsRead

        void markAllItemsAsRead()

        Marks all items in inbox folder as read without receipts.

      • markAllItemsAsUnread

        void markAllItemsAsUnread()

        Marks all items in inbox folder as unread.

      • markAllItemsAsRead

        void markAllItemsAsRead(String... folderIds)

        Marks all items in specified folders as read without receipts.

        Parameters:
        folderIds - List of folder uri for processing.
      • markAllItemsAsUnread

        void markAllItemsAsUnread(String... folderIds)

        Marks all items in specified folders as unread.

        Parameters:
        folderIds - List of folder uri for processing.
      • markAllItemsAsRead

        void markAllItemsAsRead(Iterable<String> folderIds)

        Marks all items in specified folders as read without receipts.

        Parameters:
        folderIds - List of folder uri for processing.
      • markAllItemsAsUnread

        void markAllItemsAsUnread(Iterable<String> folderIds)

        Marks all items in specified folders as unread.

        Parameters:
        folderIds - List of folder uri for processing.
      • markAllItems

        void markAllItems(boolean read,
                        String... folderIds)

        Marks all items in specified folders.

        Parameters:
        read - Sets the read/unread state to messages in specified folder. True to mark messages in the folder as read. False to mark messages as unread.
        folderIds - List of folder uri for processing.
      • markAllItems

        void markAllItems(boolean read,
                        boolean suppressReadReceipts,
                        String... folderIds)

        Marks all items in specified folders.

        Parameters:
        read - Sets the read/unread state to messages in specified folder. True to mark messages in the folder as read. False to mark messages as unread.
        suppressReadReceipts - True to suppress sending read receipts for messages; otherwise, false.
        folderIds - List of folder uri for processing.
      • markAllItems

        void markAllItems(boolean read,
                        boolean suppressReadReceipts,
                        Iterable<String> folderIds)

        Marks all items in specified folders.

        Parameters:
        read - Sets the read/unread state to messages in specified folder. True to mark messages in the folder as read. False to mark messages as unread.
        suppressReadReceipts - True to suppress sending read receipts for messages; otherwise, false.
        folderIds - List of folder uri for processing.
      • replyAll

        void replyAll(MailMessage message,
                    ExchangeMessageInfo referencedMessage)

        Reply to the sender and all recipients of a message.

        Parameters:
        message - The MailMessage that represents the precomposed reply message.
        referencedMessage - The ExchangeMessageInfo that represents the original message.
      • updateContact

        void updateContact(Contact contact)

        Updates a contact item in the Exchange store.

        Parameters:
        contact - Contact item
      • getContact

        Contact getContact(ObjectIdentifier contactId)

        Retrieves contact information according to specified identifier.

        Parameters:
        contactId - Contact identifier
        Returns:
        Contact information
      • getContact

        Contact getContact(ObjectIdentifier contactId,
                         int options)

        Retrieves contact information according to specified identifier.

        Parameters:
        contactId - Contact identifier
        options - Settings for retrieving contact.
        Returns:
        Contact information
      • getContact

        Contact getContact(String contactId)

        Retrieves contact information according to specified identifier.

        Parameters:
        contactId - Contact identifier
        Returns:
        Contact information
      • getContact

        Contact getContact(String contactId,
                         int options)

        Retrieves contact information according to specified identifier.

        Parameters:
        contactId - Contact identifier
        options - Settings for retrieving contact.
        Returns:
        Contact information
      • getContacts

        Contact[] getContacts(String folder,
                            int options)

        Lists contacts located in the specified folder on server

        Parameters:
        folder - A folder to search contacts in
        options - Enumerates the list contacts options
        Returns:
        An array of read Contact that represents contact information
      • getMailboxes

        Contact[] getMailboxes()

        Lists mailboxes having smtp addresses. Note: the maximum count of returned contacts is 100. This is a restriction of used EWS operation.

        Returns:
        Contacts that represents contact information
      • resolveContacts

        Contact[] resolveContacts(String unresolvedEntry,
                                int options)

        Resolves ambiguous e-mail addresses and display names Note: the maximum count of returned contacts is 100. This is a restriction of used EWS operation.

        Parameters:
        unresolvedEntry - A name of contact to resolve
        options - Enumerates the list contacts options
        Returns:
        Contacts that represents contacts information
        Throws:
        AsposeArgumentException - unresolvedEntry is null or empty
      • loadContactPhoto

        void loadContactPhoto(ContactPhoto photo)

        Loads contact photo binary data

        Parameters:
        photo - contact photo
      • syncFolder

        SyncFolderResult syncFolder(String folderUri)

        Retrieves changes of the items and subfolders in a specified folder.

        Parameters:
        folderUri - The folder uri
        Returns:
        Returns result of SyncFolder operation.
      • syncFolder

        SyncFolderResult syncFolder(String folderUri,
                                  int syncType)

        Retrieves changes of the items and subfolders in a specified folder.

        Parameters:
        folderUri - The folder uri
        syncType - Folder synchronization type
        Returns:
        Returns result of SyncFolder operation.
      • syncFolder

        SyncFolderResult syncFolder(SyncState syncState)

        Retrieves changes of the items in a specified folder.

        Parameters:
        syncState - The synchronization state.
        Returns:
        Returns result of SyncFolder operation.
      • syncFolder

        SyncFolderResult syncFolder(String folderUri,
                                  String syncState)

        Retrieves changes of the items in a specified folder.

        Parameters:
        folderUri - The folder uri
        syncState - The optional synchronization state. Must be null for first synchronization.
        Returns:
        Returns result of SyncFolder operation.
      • syncFolder

        SyncFolderResult syncFolder(String folderUri,
                                  String syncState,
                                  Iterable<String> ignoreList)

        Retrieves changes of the items in a specified folder.

        Parameters:
        folderUri - The folder uri
        syncState - The optional synchronization state. Must be null for first synchronization.
        ignoreList - The optional list of item uris that should be ignored.
        Returns:
        Returns result of SyncFolder operation.
      • getHeaders

        com.aspose.ms.System.Collections.Generic.List<com.aspose.ms.System.Collections.Generic.KeyValuePair<String,String>> getHeaders()

        Gets array of name value pairs wich are added to WebHeaderCollection in EWS request.

      • addHeader

        void addHeader(String name,
                     String value)

        Adds name and value to WebHeaderCollection in EWS request.

        Parameters:
        name - Header name
        value - Header value
      • removeHeader

        void removeHeader(String name)

        Remove WebHeader from WebHeaderCollection in EWS request.

        Parameters:
        name - Header name
      • appendMessage

        String appendMessage(MailMessage message)

        Uploads the mail message to the Inbox folder

        Parameters:
        message - A message to upload
        Returns:
        An uri of created message
      • appendMessage

        @Deprecated
        String appendMessage(String folder,
                                      MailMessage message,
                                      boolean markAsSent)
        Deprecated. Please, use MailMessage.IsDraft property instead of markAsSent

        Uploads the mail message to the specified folder

        Parameters:
        folder - An uri of folder to which message is uploaded
        message - A message to upload
        markAsSent - A value indicating whether the message should be appended as a sent message or a draft.
        Returns:
        An uri of created message
      • appendMessages

        String[] appendMessages(MailMessage... messages)

        Uploads the mail message to the specified folder

        Parameters:
        messages - A messages to upload
        Returns:
        List of uri of created messages
      • appendMessages

        String[] appendMessages(Iterable<MailMessage> messages)

        Uploads the mail message to the specified folder

        Parameters:
        messages - A messages to upload
        Returns:
        List of uri of created messages
      • appendMessages

        String[] appendMessages(String folder,
                              MailMessage... messages)

        Uploads the mail message to the specified folder

        Parameters:
        folder - A folder to which message is uploaded
        messages - A messages to upload
        Returns:
        List of uri of created messages
      • appendMessages

        String[] appendMessages(String folder,
                              Iterable<MailMessage> messages)

        Uploads the mail message to the specified folder

        Parameters:
        folder - A folder to which message is uploaded
        messages - A messages to upload
        Returns:
        List of uri of created messages
      • appendMessage

        String appendMessage(String folder,
                           MailMessage message)

        Uploads the mail message to the specified folder

        Parameters:
        folder - A folder to which message is uploaded
        message - A message to upload
        Returns:
        An uri of created message
      • deleteDistributionList

        void deleteDistributionList(ExchangeDistributionList distributionList,
                                  boolean deletePermanently)

        Deletes the Distribution List.

        Parameters:
        distributionList - A ExchangeDistributionList containing information about Distribution List to delete.
        deletePermanently - Indicates whether the specified List should be deleted permanently or should be moved into DeletedItems folder.
      • createCalendarSharingInvitationMessage

        MapiMessage createCalendarSharingInvitationMessage(String recipient)

        Create calendar sharing invitation message.

        Parameters:
        recipient - A recipient's address.
        Returns:
        A MapiMessage that represents sharing invitation message.
      • listSubFoldersByPage

        ExchangeFolderPageInfo listSubFoldersByPage(String parentFolderUri,
                                                  PageInfo page)

        Searches the specified folder in the given parent folder with paging Method supports paging.

        Parameters:
        parentFolderUri - A parent folder URI
        page - A page info
        Returns:
        A ExchangeFolderPageInfo containing the found folder if folder name is specified; otherwise, returns all subfolders
      • listSubFoldersByPage

        ExchangeFolderPageInfo listSubFoldersByPage(String parentFolderUri,
                                                  int itemsPerPage)

        Searches the specified folder in the given parent folder with paging Method supports paging. Invokes for the first time in paging cycle.

        Parameters:
        parentFolderUri - A parent folder URI
        itemsPerPage - A number of folders in page
        Returns:
        A ExchangeFolderPageInfo containing the found folder if folder name is specified; otherwise, returns all subfolders
      • listSubFoldersByPage

        ExchangeFolderPageInfo listSubFoldersByPage(String parentFolderUri,
                                                  int itemsPerPage,
                                                  int pageOffset)

        Searches the specified folder in the given parent folder with paging Method supports paging.

        Parameters:
        parentFolderUri - A parent folder URI
        itemsPerPage - A number of folders in page
        pageOffset - An offset of next item in view
        Returns:
        A ExchangeFolderPageInfo containing the found folder if folder name is specified; otherwise, returns all subfolders
      • listAppointmentsByPage

        AppointmentPageInfo listAppointmentsByPage(int itemsPerPage)

        Retrieves page with appointments for calendar folder

        Parameters:
        itemsPerPage - A number of items in page
        Returns:
        Returns page with appointments
      • listAppointmentsByPage

        AppointmentPageInfo listAppointmentsByPage(String folderUri,
                                                 int itemsPerPage)

        Retrieves page with appointments for specified calendar folder

        Parameters:
        folderUri - A folder to search appointments in.
        itemsPerPage - A number of items in page
        Returns:
        Returns collection of appointments
      • listAppointmentsByPage

        AppointmentPageInfo listAppointmentsByPage(MailQuery query,
                                                 int itemsPerPage)

        Retrieves page with appointments for calendar folder

        Parameters:
        query - MailQuery that represents appointments search criteria.
        itemsPerPage - A number of items in page
        Returns:
        Returns page with appointments
      • listAppointmentsByPage

        AppointmentPageInfo listAppointmentsByPage(String folderUri,
                                                 MailQuery query,
                                                 int itemsPerPage)

        Retrieves page with appointments for specified calendar folder

        Parameters:
        folderUri - A folder to search appointments in.
        query - MailQuery that represents appointments search criteria.
        itemsPerPage - A number of items in page
        Returns:
        Returns page with appointments
      • listAppointmentsByPage

        AppointmentPageInfo listAppointmentsByPage(int itemsPerPage,
                                                 int itemOffset)

        Retrieves page with appointments for calendar folder

        Parameters:
        itemsPerPage - A number of items in page
        itemOffset - An offset of next item in view
        Returns:
        Returns page with appointments
      • listAppointmentsByPage

        AppointmentPageInfo listAppointmentsByPage(String folderUri,
                                                 int itemsPerPage,
                                                 int itemOffset)

        Retrieves page with appointments for specified calendar folder

        Parameters:
        folderUri - A folder to search appointments in.
        itemsPerPage - A number of items in page
        itemOffset - An offset of next item in view
        Returns:
        Returns page with appointments
      • listAppointmentsByPage

        AppointmentPageInfo listAppointmentsByPage(MailQuery query,
                                                 int itemsPerPage,
                                                 int itemOffset)

        Retrieves page with appointments for calendar folder

        Parameters:
        query - MailQuery that represents appointments search criteria.
        itemsPerPage - A number of items in page
        itemOffset - An offset of next item in view
        Returns:
        Returns page with appointments
      • listAppointmentsByPage

        AppointmentPageInfo listAppointmentsByPage(String folderUri,
                                                 MailQuery query,
                                                 int itemsPerPage,
                                                 int itemOffset)

        Retrieves page with appointments for specified calendar folder

        Parameters:
        folderUri - A folder to search appointments in.
        query - MailQuery that represents appointments search criteria.
        itemsPerPage - A number of items in page
        itemOffset - An offset of next item in view
        Returns:
        Returns page with appointments
      • listMessagesByPage

        ExchangeMessagePageInfo listMessagesByPage(String folder,
                                                 int itemsPerPage)

        List the messages in the specified folder.

        Parameters:
        folder - A folder to search messages in.
        itemsPerPage - A number of items in page
        Returns:
        ExchangeMessageInfoCollection that contains messages from the specified folder.
      • listMessagesByPage

        ExchangeMessagePageInfo listMessagesByPage(String folder,
                                                 MailQuery query,
                                                 int itemsPerPage)

        List the messages in the specified folder.

        Parameters:
        folder - A folder to search messages in.
        query - MailQuery that represents search criteria.
        itemsPerPage - A number of items in page
        Returns:
        ExchangeMessageInfoCollection that contains messages from the specified folder.
      • listMessagesByPage

        ExchangeMessagePageInfo listMessagesByPage(String folder,
                                                 int itemsPerPage,
                                                 int offset)

        List the messages in the specified folder.

        Parameters:
        folder - A folder to search messages in.
        itemsPerPage - A number of items in page
        offset - An offset of next page in view
        Returns:
        ExchangeMessageInfoCollection that contains messages from the specified folder.
      • listMessagesByPage

        ExchangeMessagePageInfo listMessagesByPage(String folder,
                                                 MailQuery query,
                                                 int itemsPerPage,
                                                 int offset)

        List the messages in the specified folder.

        Parameters:
        folder - A folder to search messages in.
        query - MailQuery that represents search criteria.
        itemsPerPage - A number of items in page
        offset - An offset of next page in view
        Returns:
        ExchangeMessageInfoCollection that contains messages from the specified folder.
      • listMessagesByPage

        ExchangeMessagePageInfo listMessagesByPage(String folder,
                                                 int itemsPerPage,
                                                 int pageOffset,
                                                 int options)

        List the messages in the specified folder.

        Parameters:
        folder - A folder to search messages in.
        itemsPerPage - A number of items in page
        pageOffset - An offset of next item in view
        options - Specifies the settings of listing
        Returns:
        ExchangeMessageInfoCollection that contains messages from the specified folder.
      • listMessagesByPage

        ExchangeMessagePageInfo listMessagesByPage(String folder,
                                                 PageInfo pageInfo,
                                                 int options)

        List the messages in the specified folder.

        Parameters:
        folder - A folder to search messages in.
        pageInfo - A page info
        options - Specifies the settings of listing
        Returns:
        ExchangeMessageInfoCollection that contains messages from the specified folder.
      • fetchMessages

        MailMessageCollection fetchMessages(com.aspose.ms.System.Collections.Specialized.StringCollection messageUris)

        Fetches the speciifed messages

        Parameters:
        messageUris - A StringCollection containing message uris to be retrieved
        Returns:
        A MailMessageCollection containing fetched messages
        Throws:
        AsposeArgumentNullException - messageUris is null
      • listTasks

        TaskCollection listTasks()

        Retrieves lists of exchange tasks for default folder.

        Returns:
        Tasks collection
      • listTasks

        TaskCollection listTasks(String folder)

        Retrieves lists of exchange tasks.

        Parameters:
        folder - Tasks folder
        Returns:
        Tasks collection
      • listTasks

        TaskCollection listTasks(String folder,
                               MailQuery query)

        Retrieves lists of exchange tasks.

        Parameters:
        folder - Tasks folder
        query - Mail query
        Returns:
        Tasks collection
      • listTasks

        TaskCollection listTasks(String folder,
                               int maxNumberOfItems)

        Retrieves lists of exchange tasks.

        Parameters:
        folder - Tasks folder
        maxNumberOfItems - Maximum number of items
        Returns:
        Tasks collection
      • listTasks

        TaskCollection listTasks(String folder,
                               int maxNumberOfItems,
                               MailQuery query)

        Retrieves lists of exchange tasks.

        Parameters:
        folder - Tasks folder
        maxNumberOfItems - Maximum number of items
        query - Mail query
        Returns:
        Tasks collection
      • listTasks

        TaskCollection listTasks(String folder,
                               int maxNumberOfItems,
                               MailQuery query,
                               boolean recursive)

        Retrieves lists of exchange tasks.

        Parameters:
        folder - Tasks folder
        maxNumberOfItems - Maximum number of items
        query - Mail query
        recursive - Retrieve tasks recursivly
        Returns:
        Tasks collection
      • listItems

        String[] listItems(String folder)

        Retrieve list of item uries in specified folder

        Parameters:
        folder - folder to search items
        Returns:
        Returns list of item uries
      • listItems

        String[] listItems(String folder,
                         MailQuery query)

        Retrieve list of item uries in specified folder

        Parameters:
        folder - folder to search items
        query - Additional conditions to select items
        Returns:
        Returns list of item uries
      • listItems

        String[] listItems(String folder,
                         MailQuery query,
                         boolean recursive)

        Retrieve list of item uries in specified folder

        Parameters:
        folder - folder to search items
        query - Additional conditions to select items
        recursive - Specifies whether request should be reqursive.
        Returns:
        Returns list of item uries
      • fetchMapiCalendar

        @Deprecated
        MapiCalendar fetchMapiCalendar(String calendarUri)
        Deprecated. This method is obsolete and will be removed soon. Please use FetchItem method

        Fetch MapiCalendar object.

        Parameters:
        calendarUri - calendar uri to be fetched.
        Returns:
        Fetch MapiCalendar object.
      • fetchMapiCalendar

        com.aspose.ms.System.Collections.Generic.IGenericList<MapiCalendar> fetchMapiCalendar(Iterable<String> calendarUris)

        Fetch array of MapiCalendar objects.

        Parameters:
        calendarUris - List of calendar uris to be fetched.
        Returns:
        Fetch array of MapiCalendar objects.
      • fetchMapiCalendar

        com.aspose.ms.System.Collections.Generic.IGenericList<MapiCalendar> fetchMapiCalendar(Iterable<String> calendarUris,
                                                                                            Iterable<PropertyDescriptor> customProperties)

        Fetch array of MapiCalendar objects.

        Parameters:
        calendarUris - List of calendar uris to be fetched.
        customProperties - Custom mapi properties to retrieve.
        Returns:
        Fetch array of MapiCalendar objects.
      • getMailboxUri

        String getMailboxUri()

        Gets or sets the mailbox uri.

      • setMailboxUri

        void setMailboxUri(String value)

        Gets or sets the mailbox uri.

      • getMailboxSize

        long getMailboxSize()

        Gets the size of the mailbox. Please, note this operation is performed recursively for all subfolders and make take some time

        Returns:
        size of the mailbox in bytes
      • getMailboxSizeEx

        long getMailboxSizeEx(String folderUri)

        Gets the size of the mailbox Please, note this operation is performed recursively for all subfolders and make take some time

        Parameters:
        folderUri - Folder uri
        Returns:
        size of the mailbox in bytes
      • getMailboxSize

        @Deprecated
        long getMailboxSize(String mailbox)
        Deprecated. 

        Gets the size of the mailbox

        Parameters:
        mailbox - A mailbox.
        Returns:
        size of the mailbox in bytes
      • listMessagesByOption

        ExchangeMessageInfoCollection listMessagesByOption(String folder,
                                                         int maxNumberOfMessages,
                                                         int options)

        Lists the messages.

        Parameters:
        folder - The folder.
        maxNumberOfMessages - Maximum number of messages
        options - Specifies the settings of listing
        Returns:
        A ExchangeMessageInfoCollection
      • saveMessage

        void saveMessage(String messageUri,
                       String path)

        Saves the message.

        Parameters:
        messageUri - The message URI.
        path - The path to save message.
      • saveMessage

        void saveMessage(String messageUri,
                       OutputStream stream)

        Saves the message.

        Parameters:
        messageUri - The message URI.
        stream - The stream.
      • saveMessageInternal

        void saveMessageInternal(String messageUri,
                               com.aspose.ms.System.IO.Stream stream)
      • send

        void send(MailMessage message)

        Sends the specified message.

        Parameters:
        message - The message.
      • setReadFlag

        void setReadFlag(String messageUri)

        Sets the read flag.

        Parameters:
        messageUri - The message URI.
      • fetchMessage

        MailMessage fetchMessage(String messageUri)

        Fetches the message.

        Parameters:
        messageUri - The message URI.
        Returns:
        Returns a message
      • fetchAttachment

        Attachment fetchAttachment(String attachmentUri)

        Fetches the attachment

        Parameters:
        attachmentUri - The attachment uri
        Returns:
        Attachment that represents fetched attachment
      • deleteFolder

        void deleteFolder(String folderUri)

        Deletes the folder

        Parameters:
        folderUri - The folder Uri
      • folderExists

        boolean folderExists(String parentFolderUri,
                           String folderName)

        Checks whether the specified folder exists.

        Parameters:
        parentFolderUri - An uri of parent folder.
        folderName - A folder name.
        Returns:
        true if the specified folder exists in the specified parent folder; otherwise, false.
        Throws:
        AsposeArgumentException - parentFolderUri or folderName is null or empty
      • folderExists

        boolean folderExists(String parentFolderUri,
                           String folderName,
                           ExchangeFolderInfo[] folder)

        Checks whether the specified folder exists.

        Parameters:
        parentFolderUri - An uri of parent folder.
        folderName - A folder name.
        folder - A ExchangeFolderInfo that represents the found folder information, if folder exists.
        Returns:
        true if the specified folder exists in the specified parent folder; otherwise, false.
      • backup

        void backup(ExchangeFolderInfoCollection folders,
                  String fileName,
                  int options)

        Backups the content of the specified folders

        Parameters:
        folders - A folders to backup
        fileName - A path to the presonal storage file
        options - A backup options
      • backup

        void backup(ExchangeFolderInfoCollection folders,
                  OutputStream stream,
                  int options)

        Backups the content of the specified folders

        Parameters:
        folders - A folders to backup
        stream - A stream to write into
        options - A backup options
      • restore

        @Deprecated
        void restore(String fileName,
                              int options)
        Deprecated. Please, use Restore(PersonalStorage pst, RestoreSettings settings) method instead of it.

        Restores exchange folders from the specified personal storage file.

        Parameters:
        fileName - A path to personal storage file.
        options - Restore options.
      • restore

        @Deprecated
        void restore(InputStream stream,
                              int options)
        Deprecated. Please, use Restore(PersonalStorage pst, RestoreSettings settings) method instead of it.

        Restores exchange folders from the given personal storage.

        Parameters:
        stream - A stream containing personal storage.
        options - Restore options.
      • restore

        @Deprecated
        void restore(PersonalStorage pst,
                              int options)
        Deprecated. Please, use Restore(PersonalStorage pst, RestoreSettings settings) method instead of it.

        Restores exchange folders from the given personal storage.

        Parameters:
        pst - A personal storage containing the backuped imap folders.
        options - Restore options.
      • restore

        @Deprecated
        void restore(String fileName,
                              ExchangeFolderInfoCollection folders,
                              int options)
        Deprecated. Please, use Restore(PersonalStorage pst, RestoreSettings settings) method instead of it.

        Restores the specified exchange folders from the specified personal storage file.

        Parameters:
        fileName - A path to personal storage file.
        folders - A folders to be restored.
        options - Restore options.
      • restore

        @Deprecated
        void restore(InputStream stream,
                              ExchangeFolderInfoCollection folders,
                              int options)
        Deprecated. Please, use Restore(PersonalStorage pst, RestoreSettings settings) method instead of it.

        Restores the specified exchange folders from the given personal storage.

        Parameters:
        stream - A stream containing personal storage.
        folders - A folders to be restored.
        options - Restore options.
      • restore

        @Deprecated
        void restore(PersonalStorage pst,
                              ExchangeFolderInfoCollection folders,
                              int options)
        Deprecated. Please, use Restore(PersonalStorage pst, RestoreSettings settings) method instead of it.

        Restores the specified exchange folders from the given personal storage.

        Parameters:
        pst - A personal storage containing the backuped exchange folders.
        folders - A folders to be restored.
        options - Restore options.
      • restore

        void restore(PersonalStorage pst,
                   RestoreSettings settings)

        Restores the specified exchange folders from the given personal storage.

        Parameters:
        pst - A personal storage containing the backuped exchange folders.
        settings - The restore settings.
      • getVersionInfo

        String getVersionInfo()

        Returns exchange server version info

        Returns:
        Returns exchange server version info
      • createContact

        String createContact(MapiContact contact)

        Creates a contact item in the Exchange store.

        Parameters:
        contact - Contact item
        Returns:
        The contact Uri
      • createContact

        String createContact(String folderUri,
                           MapiContact contact)

        Creates a contact item in the specified folder.

        Parameters:
        folderUri - Folder uri
        contact - Contact item
        Returns:
        The contact Uri
      • createContact

        String createContact(Contact contact)

        Creates a contact item in the Exchange store.

        Parameters:
        contact - Contact item
        Returns:
        The contact Uri
      • createContact

        String createContact(String folderUri,
                           Contact contact)

        Creates a contact item in the specified folder.

        Parameters:
        folderUri - Folder uri
        contact - Contact item
        Returns:
        The contact Uri
      • resolveContact

        MapiContactCollection resolveContact(String unresolvedEntry)

        Resolves ambiguous mailbox names.

        Parameters:
        unresolvedEntry - A name of contact to resolve.
        Returns:
        A MapiContactCollection that represents contacts information.
      • resolveContacts

        Contact[] resolveContacts(String unresolvedEntry)

        Resolves ambiguous mailbox display names. Note: the maximum count of returned contacts is 100. This is a restriction of used exchange command.

        Parameters:
        unresolvedEntry - A name of contact to resolve.
        Returns:
        An array of Contact objects.
      • listContacts

        MapiContact[] listContacts(String folderUri)

        Lists contacts located in the specified folder on server

        Parameters:
        folderUri - The URI of folder
        Returns:
        An array of read MapiContact that represents contact information
      • listContacts

        MapiContact[] listContacts(String folderUri,
                                 Iterable<PropertyDescriptor> mapiProperties)

        Lists contacts located in the specified folder on server

        Parameters:
        folderUri - A folder to search contacts in
        mapiProperties - Required additional mapi properties
        Returns:
        An array of read MapiContact that represents contact information
      • getContacts

        Contact[] getContacts(String folder)

        Lists contacts located in the specified folder on server

        Parameters:
        folder - A folder to search contacts in
        Returns:
        An array of read Contact that represents contact information
      • fetchContact

        @Deprecated
        MapiContact fetchContact(String contactUri)
        Deprecated. This method is obsolete and will be removed soon. Please use FetchItem method

        Fetches MapiContact object

        Parameters:
        contactUri - Contact object uri
        Returns:
        MapiContact object
      • fetchItem

        MapiMessage fetchItem(String uri)

        Retrieves the complete item with attachments.

        Parameters:
        uri - The item URI.
        Returns:
        MapiMessage object.
      • updateContact

        void updateContact(MapiContact contact)

        Updates a contact item in the Exchange store.

        Parameters:
        contact - Contact item
      • fetchMapiTasks

        com.aspose.ms.System.Collections.Generic.IGenericList<MapiTask> fetchMapiTasks(Iterable<String> taskUris)

        Fetch array of MapiTask objects.

        Parameters:
        taskUris - List of task uris to be fetched.
        Returns:
        Fetch array of MapiTask objects.
      • fetchMapiTasks

        com.aspose.ms.System.Collections.Generic.IGenericList<MapiTask> fetchMapiTasks(Iterable<String> taskUris,
                                                                                     Iterable<PropertyDescriptor> customProperties)

        Fetch array of MapiTask objects.

        Parameters:
        taskUris - List of task uris to be fetched.
        customProperties - Custom mapi properties to retrieve.
        Returns:
        Fetch array of MapiTask objects.
      • fetchMapiTask

        @Deprecated
        MapiTask fetchMapiTask(String taskUri)
        Deprecated. This method is obsolete and will be removed soon. Please use FetchItem method

        Fetches MapiTask object.

        Parameters:
        taskUri - task uri to be fetched.
        Returns:
        MapiTask object.
      • fetchMapiTask

        @Deprecated
        MapiTask fetchMapiTask(String taskUri,
                                        Iterable<PropertyDescriptor> customProperties)
        Deprecated. This method is obsolete and will be removed soon. Please use FetchItem method

        Fetches MapiTask object.

        Parameters:
        taskUri - task uri to be fetched.
        customProperties - Custom mapi properties to retrieve.
        Returns:
        MapiTask object.
      • createTask

        String createTask(MapiTask task)

        Creates the given task in the default task folder.

        Parameters:
        task - A task to create.
      • createTask

        String createTask(String folder,
                        MapiTask task)

        Creates the given task in the specified folder.

        Parameters:
        folder - A folder where task should be created.
        task - A task to create.
      • updateTask

        String updateTask(MapiTask task)

        Updates the specified task.

        Parameters:
        task - An MapiTask containing the task information.
        Returns:
        Task uri.
      • updateTask

        String updateTask(String uri,
                        MapiTask task)

        Updates the specified task.

        Parameters:
        uri - Task identifier
        task - An ExchangeTask containing the task information.
        Returns:
        Task uri.
      • updateTask

        String updateTask(String uri,
                        MapiTask task,
                        Iterable<PropertyDescriptor> additionalProperties)

        Updates the specified task.

        Parameters:
        uri - Task identifier
        task - An ExchangeTask containing the task information.
        additionalProperties - An additional MAPI properties which can be used in MAPI object.
        Returns:
        Task uri.
      • fetchMapiNote

        @Deprecated
        MapiNote fetchMapiNote(String noteUri)
        Deprecated. This method is obsolete and will be removed soon. Please use FetchItem method

        Fetches MapiNote object.

        Parameters:
        noteUri - note uri to be fetched.
        Returns:
        MapiNote object.
      • fetchMapiNote

        @Deprecated
        MapiNote fetchMapiNote(String noteUri,
                                        Iterable<PropertyDescriptor> customProperties)
        Deprecated. This method is obsolete and will be removed soon. Please use FetchItem method

        Fetches MapiNote object.

        Parameters:
        noteUri - note uri to be fetched.
        customProperties - Custom mapi properties to retrieve.
        Returns:
        MapiNote object.
      • fetchMapiNotes

        com.aspose.ms.System.Collections.Generic.IGenericList<MapiNote> fetchMapiNotes(Iterable<String> noteUris)

        Fetch array of MapiNote objects.

        Parameters:
        noteUris - List of note uris to be fetched.
        Returns:
        Fetch array of MapiNote objects.
      • fetchMapiNotes

        com.aspose.ms.System.Collections.Generic.IGenericList<MapiNote> fetchMapiNotes(Iterable<String> noteUris,
                                                                                     Iterable<PropertyDescriptor> customProperties)

        Fetch array of MapiNote objects.

        Parameters:
        noteUris - List of note uris to be fetched.
        customProperties - Custom mapi properties to retrieve.
        Returns:
        Fetch array of MapiNote objects.
      • createNote

        String createNote(MapiNote note)

        Creates the given note in the default note folder.

        Parameters:
        note - A note to create.
        Returns:
        Note uri.
      • createNote

        String createNote(String folder,
                        MapiNote note)

        Creates the given note in the specified folder.

        Parameters:
        folder - A folder where note should be created.
        note - A note to create.
        Returns:
        Note uri.
      • updateNote

        String updateNote(MapiNote note)

        Updates the specified note.

        Parameters:
        note - An MapiNote containing the note information.
        Returns:
        Note uri.
      • updateNote

        String updateNote(String uri,
                        MapiNote note)

        Updates the specified note.

        Parameters:
        uri - Note identifier
        note - An MapiNote containing the note information.
        Returns:
        Note uri.
      • updateNote

        String updateNote(String uri,
                        MapiNote note,
                        Iterable<PropertyDescriptor> additionalProperties)

        Updates the specified note.

        Parameters:
        uri - Note identifier
        note - An MapiNote containing the note information.
        additionalProperties - An additional MAPI properties which can be used in MAPI object.
        Returns:
        Note uri.
      • fetchMapiMessage

        @Deprecated
        MapiMessage fetchMapiMessage(String uri)
        Deprecated. This method is obsolete and will be removed soon. Please use FetchItem method

        Fetches the speciifed message

        Parameters:
        uri - A String containing message uri to be retrieved
        Returns:
        Fetched MapiMessage.
      • fetchMapiMessage

        @Deprecated
        MapiMessage fetchMapiMessage(String uri,
                                              Iterable<PropertyDescriptor> extendedProperties)
        Deprecated. This method is obsolete and will be removed soon. Please use FetchItem method

        Fetches the speciifed message

        Parameters:
        uri - A String containing message uri to be retrieved
        extendedProperties - An enumeration of extended properties
        Returns:
        Fetched MapiMessage.
      • fetchMapiMessages

        MapiMessage[] fetchMapiMessages(Iterable<String> uris)

        Fetches the speciifed messages

        Parameters:
        uris - A IEnumerable{String}IEnumerable&lt;string&gt; "/> containing message uris to be retrieved
        Returns:
        An array of MapiMessage containing fetched messages
      • fetchMapiMessages

        MapiMessage[] fetchMapiMessages(Iterable<String> uris,
                                      Iterable<PropertyDescriptor> extendedProperties)

        Fetches the speciifed messages

        Parameters:
        uris - A StringCollection containing message uris to be retrieved
        extendedProperties - An enumeration of extended properties
        Returns:
        An array of MapiMessage containing fetched messages
      • appendMessage

        String appendMessage(MapiMessage mapiMessage)

        Uploads the mail message to the specified folder

        Parameters:
        mapiMessage - A message to upload
        Returns:
        An uri of created message
      • appendMessage

        String appendMessage(MapiMessage mapiMessage,
                           boolean markAsSent)

        Uploads the mail message to the specified folder

        Parameters:
        mapiMessage - A message to upload
        markAsSent - A value indicating whether the message should be appended as a sent message or a draft.
        Returns:
        An uri of created message
      • appendMessage

        String appendMessage(String folder,
                           MapiMessage mapiMessage,
                           boolean markAsSent)

        Uploads the mail message to the specified folder

        Parameters:
        folder - A folder to which message is uploaded
        mapiMessage - A message to upload
        markAsSent - A value indicating whether the message should be appended as a sent message or a draft.
        Returns:
        An uri of created message
        Throws:
        AsposeArgumentException - A folder is not specified
        AsposeArgumentNullException - mapiMessage is null
      • deleteMessage

        @Deprecated
        void deleteMessage(String messageUri)
        Deprecated. Please, use DeleteItems method

        Deletes the mail message

        Parameters:
        messageUri - The message uri
      • deleteMessage

        @Deprecated
        void deleteMessage(String messageUri,
                                    boolean deletePermanently)
        Deprecated. Please, use DeleteItems method

        Deletes the mail message

        Parameters:
        messageUri - The message uri
        deletePermanently - delete permanently
      • deleteMessages

        @Deprecated
        void deleteMessages(com.aspose.ms.System.Collections.Specialized.StringCollection messageUris)
        Deprecated. Please, use DeleteItems method

        Deletes the specified mail messages

        Parameters:
        messageUris - The message uris
      • deleteMessages

        @Deprecated
        void deleteMessages(com.aspose.ms.System.Collections.Specialized.StringCollection messageUris,
                                     boolean deletePermanently)
        Deprecated. Please, use DeleteItems method

        Deletes the specified mail messages

        Parameters:
        messageUris - The message uris
        deletePermanently - delete permanently
      • deleteMessages

        @Deprecated
        void deleteMessages(com.aspose.ms.System.Collections.Specialized.StringCollection messageUris,
                                     boolean deletePermanently,
                                     int notyficationType)
        Deprecated. Please, use DeleteItems method

        Deletes the specified mail messages

        Parameters:
        messageUris - The message uris
        deletePermanently - Indicates whether the specified message should be deleted permanently or should be moved into DeletedItems folder
        notyficationType - Describes how meeting requests and cancellations are handled.
      • deleteTask

        @Deprecated
        void deleteTask(String taskUri)
        Deprecated. Please, use DeleteItems method

        Deletes the specified task.

        Parameters:
        taskUri - Uri of task to be deleted.
      • deleteTask

        @Deprecated
        void deleteTask(String taskUri,
                                 int taskOptions)
        Deprecated. Please, use DeleteItems method

        Deletes the specified task.

        Parameters:
        taskUri - Uri of task to be deleted.
        taskOptions - Task options
      • deleteContact

        @Deprecated
        void deleteContact(MapiContact contact)
        Deprecated. Please, use DeleteItems method

        Deletes the contact.

        Parameters:
        contact - Contact
      • deleteContact

        @Deprecated
        void deleteContact(Contact contact)
        Deprecated. Please, use DeleteItems method

        Deletes the contact.

        Parameters:
        contact - Contact
      • deleteContact

        @Deprecated
        void deleteContact(String id)
        Deprecated. Please, use DeleteItems method

        Deletes the contact.

        Parameters:
        id - The contact identifier.
      • deleteContact

        @Deprecated
        void deleteContact(Contact contact,
                                    boolean deletePermanently)
        Deprecated. Please, use DeleteItems method

        Deletes the contact.

        Parameters:
        contact - Contact
        deletePermanently - delete permanently
      • deleteContact

        @Deprecated
        void deleteContact(String id,
                                    boolean deletePermanently)
        Deprecated. Please, use DeleteItems method

        Deletes the contact.

        Parameters:
        id - The contact identifier.
        deletePermanently - delete permanently
      • deleteContacts

        @Deprecated
        void deleteContacts(com.aspose.ms.System.Collections.Specialized.StringCollection contactIds)
        Deprecated. Please, use DeleteItems method

        Deletes the contacts.

        Parameters:
        contactIds - The contact identifiers.
      • deleteContacts

        @Deprecated
        void deleteContacts(com.aspose.ms.System.Collections.Specialized.StringCollection contactIds,
                                     boolean deletePermanently)
        Deprecated. Please, use DeleteItems method

        Deletes the contacts.

        Parameters:
        contactIds - The contact identifiers.
        deletePermanently - delete permanently
      • findPeople

        Contact[] findPeople(String queryString,
                           int maxNumberOfItems)

        Find contacts located in the global address list (GAL) on server

        Parameters:
        queryString - Represents contact search criteria
        maxNumberOfItems - Maximum number of items
        Returns:
        An array of Contact that represents contact information
      • findPeople

        Contact[] findPeople(String folderUri,
                           MailQuery query,
                           int maxNumberOfItems)

        Find contacts located in the specified user's personal mailbox on server

        Parameters:
        folderUri - The URI of folder
        query - MailQuery that represents contact search criteria.
        maxNumberOfItems - Maximum number of items
        Returns:
        An array of Contact that represents contact information
      • deleteItem

        void deleteItem(String itemUri,
                      DeletionOptions options)

        Deletes specified item

        Parameters:
        itemUri - The item uri
        options - Defines parameters for item deletion
      • deleteItems

        void deleteItems(Iterable<String> itemUris,
                       DeletionOptions options)

        Deletes specified items

        Parameters:
        itemUris - An items uris
        options - Defines parameters for items deletion
      • getReconnectCount

        int getReconnectCount()

        Gets or sets the number of reconnect attempts at connection breaks.

      • setReconnectCount

        void setReconnectCount(int value)

        Gets or sets the number of reconnect attempts at connection breaks.

      • archiveItem

        void archiveItem(String sourceFolderUri,
                       MapiMessageItemBase item)

        The ArchiveItem operation moves an item into the mailbox user's archive mailbox.

        Parameters:
        sourceFolderUri -
        item - Item which will be archived
      • archiveItem

        void archiveItem(String sourceFolderUri,
                       Appointment appointment)

        The ArchiveItem operation moves an item into the mailbox user's archive mailbox.

        Parameters:
        sourceFolderUri -
        appointment - Item which will be archived
      • archiveItem

        void archiveItem(String sourceFolderUri,
                       ExchangeTask task)

        The ArchiveItem operation moves an item into the mailbox user's archive mailbox.

        Parameters:
        sourceFolderUri -
        task - Item which will be archived
      • archiveItem

        void archiveItem(String sourceFolderUri,
                       String uniqueId)

        The ArchiveItem operation moves an item into the mailbox user's archive mailbox.

        Parameters:
        sourceFolderUri -
        uniqueId - Item id
      • listMailboxes

        MapiContactCollection listMailboxes(String filter)

        Please pay your attention, this overridden method works with Exchange Server 2013 and higher. Lists mailboxes.

        Parameters:
        filter - filter string
        Returns:
        A MapiContactCollection that represents contact information.