ExchangeClient

Inheritance: java.lang.Object, com.aspose.email.ExchangeClientBase

public final class ExchangeClient extends ExchangeClientBase

```

The ExchangeClient class allows applications to manage E-Mail box in Microsoft Exchange Server by using WebDav Exchange Store Protocol.

```

Constructors

Constructor Description
ExchangeClient(String mailboxUri, String username, String password) Initialize a new instance of the class ExchangeClient
ExchangeClient(String mailboxUri, String username, String password, String domain) Initialize a new instance of the class ExchangeClient
ExchangeClient(String mailboxUri, System.Net.ICredentials credentials) Initialize a new instance of the class ExchangeClient

Methods

Method Description
getClientCertificate() Gets or sets the client certificate.
setClientCertificate(System.Security.Cryptography.X509Certificates.X509Certificate value) Gets or sets the client certificate.
getKeepAlive() Indicates whether to keep alive.
setKeepAlive(boolean value) Indicates whether to keep alive.
getPreAuthenticate() Indicates whether to do pre-authentication.
setPreAuthenticate(boolean value) Indicates whether to do pre-authentication.
getEncoding() Gets or sets the encoding.
setEncoding(Charset value) Gets or sets the encoding.
getMailboxInfo() Gets the mailbox information.
getCookieContainer() Gets or sets the cookie container.
setCookieContainer(System.Net.CookieContainer value) Gets or sets the cookie container.
getSendChunked() Gets or sets a value indicating whether [send chunked].
setSendChunked(boolean value) Gets or sets a value indicating whether [send chunked].
moveMessage(ExchangeMessageInfo msgInfo, String destinationFolderUri) Moves the message.
moveMessage(ExchangeMessageInfo msgInfo, String destinationFolderUri, boolean overwrite) Moves the message.
moveMessage(String destinationFolderUri, String messageUri) Moves the message.
moveMessage(String destinationFolderUri, boolean overwrite, String messageUri) Moves the message.
moveItems(String destinationFolderUri, String[] itemsUriArray) Moves items.
moveItems(String destinationFolderUri, boolean overwrite, String[] itemsUriArray) Moves items.
getMailboxSize() Get the size of the maibox
getMailboxSize(String mailbox) Get the size of the maibox
getVersionInfo() Returns exchange server version info
getMailboxInfo(String mailbox) Gets the mailbox information
listMessages(String folder, String messageClass, boolean recursive) Lists the messages.
listMessages(String folder, boolean recursive) List the messages in the specified folder
listMessages(String folder, String query) Lists the messages.
listMessages(String folder, MailQuery query, boolean recursive) Lists the messages.
listMessagesById(String folder, String messageId) Lists the messages by id.
listMessagesByOption(String folder, int options) Lists the mail message in the specified folder.
saveMessage(String messageUri, String path) Saves mail message specified by the uri to local file system.
saveMessage(String messageUri, OutputStream stream) Saves the message.
saveMessageInternal(String messageUri, System.IO.Stream stream)
send(MailMessage message) Sends the mail message.
setReadFlag(String messageUri) Marks the specifeid message as read.
setReadFlag(String messageUri, boolean suppressReceipt) Marks the specifeid message as read.
listPublicFolders() Gets collection of public folders from root public folder
listSubFolders(String parentFolderUri) Gets collection of child folders from parent
fetchMessage(String messageUri) Fetches the mail message with specified uri.
fetchMapiMessage(String messageUri) Fetches the mapi message with specified uri.
deleteMessage(String messageUri) Deletes the mail message.
deleteMessage(String messageUri, boolean suppressReceipt) Deletes the mail message.
appendMessage(String folder, MailMessage message) Uploads the mail message to the specified folder
appendMessage(String folder, MailMessage message, boolean markAsSent) Uploads the mail message to the specified folder
listMessagesByOption(String folder, int maxNumberOfMessages, int options) List the messages in the specified folder
fetchAttachment(String attachmentUri) Fetches the attachment
backup(ExchangeFolderInfoCollection folders, String fileName, int options) Backups the content of the specified folders
backup(ExchangeFolderInfoCollection folders, OutputStream stream, int options) Backups the content of the specified folders
backupInternal(ExchangeFolderInfoCollection folders, System.IO.Stream stream, int options)
getFolderInfo(String folderUri) Gets the folder information.
folderExists(String parentFolderUri, String folderName, ExchangeFolderInfo[] folder) Checks whether the specified folder exists.
createFolder(String parentFolderUri, String name) Creates the new folder with the specified name in the specified parent folder.
deleteFolder(String folderUri) Deletes the folder
restore(String fileName, int options) Restores exchange folders from the specified personal storage file.
restore(InputStream stream, int options) Restores exchange folders from the given personal storage.
restoreInternal(System.IO.Stream stream, int options)
restore(PersonalStorage pst, int options) Restores exchange folders from the given personal storage.
restore(String fileName, ExchangeFolderInfoCollection folders, int options) Restores the specified exchange folders from the specified personal storage file.
restore(InputStream stream, ExchangeFolderInfoCollection folders, int options) Restores the specified exchange folders from the given personal storage.
restoreInternal(System.IO.Stream stream, ExchangeFolderInfoCollection folders, int options)
restore(PersonalStorage pst, ExchangeFolderInfoCollection folders, int options) Restores the specified exchange folders from the given personal storage.
createContact(Contact contact) Creates a contact item in the Exchange store.
deleteContact(Contact contact) Deletes the contact.
deleteContact(MapiContact contact) Deletes the contact.
deleteContact(String id) Deletes the contact.
getContacts(String folderUri) Lists contacts located in the specified folder on server
listContacts(String folderUri) Lists contacts located in the specified folder on server
resolveContacts(String unresolvedEntry) Resolves ambiguous mailbox display names.
listMailboxes() Lists mailboxes in the global address list.
getMailboxes() Lists mailboxes in the global address list.
listSubFolders(ExchangeFolderInfo parentFolder) Gets collection of child public folders from parent
listMessages(String folder) Lists the messages.
listMessages(String folder, int maxNumberOfMessages) Lists the messages.
listMessagesByMaxNumberOfMessages(String folder, int maxNumberOfMessages) Lists the messages.
folderExists(String parentFolderUri, String folderName) Checks whether the specified folder exists.

ExchangeClient(String mailboxUri, String username, String password)

public ExchangeClient(String mailboxUri, String username, String password)

Initialize a new instance of the class ExchangeClient

Parameters:

Parameter Type Description
mailboxUri java.lang.String The url of the mailbox
username java.lang.String The username of the mailbox
password java.lang.String The password of the mailbox

ExchangeClient(String mailboxUri, String username, String password, String domain)

public ExchangeClient(String mailboxUri, String username, String password, String domain)

Initialize a new instance of the class ExchangeClient

Parameters:

Parameter Type Description
mailboxUri java.lang.String The url of the mailbox
username java.lang.String The username of the mailbox
password java.lang.String The password of the mailbox
domain java.lang.String The domain of the user

ExchangeClient(String mailboxUri, System.Net.ICredentials credentials)

public ExchangeClient(String mailboxUri, System.Net.ICredentials credentials)

Initialize a new instance of the class ExchangeClient

Parameters:

Parameter Type Description
mailboxUri java.lang.String The url of the mailbox
credentials com.aspose.ms.System.Net.ICredentials The credentials used to log in

getClientCertificate()

public final System.Security.Cryptography.X509Certificates.X509Certificate getClientCertificate()

Gets or sets the client certificate.

Returns: com.aspose.ms.System.Security.Cryptography.X509Certificates.X509Certificate

setClientCertificate(System.Security.Cryptography.X509Certificates.X509Certificate value)

public final void setClientCertificate(System.Security.Cryptography.X509Certificates.X509Certificate value)

Gets or sets the client certificate.

Parameters:

Parameter Type Description
value com.aspose.ms.System.Security.Cryptography.X509Certificates.X509Certificate

getKeepAlive()

public final boolean getKeepAlive()

Indicates whether to keep alive.

Returns: boolean

setKeepAlive(boolean value)

public final void setKeepAlive(boolean value)

Indicates whether to keep alive.

Parameters:

Parameter Type Description
value boolean

getPreAuthenticate()

public final boolean getPreAuthenticate()

Indicates whether to do pre-authentication.

Returns: boolean

setPreAuthenticate(boolean value)

public final void setPreAuthenticate(boolean value)

Indicates whether to do pre-authentication.

Parameters:

Parameter Type Description
value boolean

getEncoding()

public final Charset getEncoding()

Gets or sets the encoding.

Returns: java.nio.charset.Charset

setEncoding(Charset value)

public final void setEncoding(Charset value)

Gets or sets the encoding.

Parameters:

Parameter Type Description
value java.nio.charset.Charset

getMailboxInfo()

public final ExchangeMailboxInfo getMailboxInfo()

Gets the mailbox information.

Returns: ExchangeMailboxInfo

getCookieContainer()

public final System.Net.CookieContainer getCookieContainer()

Gets or sets the cookie container.

Value: The cookie container.

Returns: com.aspose.ms.System.Net.CookieContainer

setCookieContainer(System.Net.CookieContainer value)

public final void setCookieContainer(System.Net.CookieContainer value)

Gets or sets the cookie container.

Value: The cookie container.

Parameters:

Parameter Type Description
value com.aspose.ms.System.Net.CookieContainer

getSendChunked()

public final boolean getSendChunked()

Gets or sets a value indicating whether [send chunked].

Value: ``` true ``` if [send chunked]; otherwise, ``` false ```.

Returns: boolean

setSendChunked(boolean value)

public final void setSendChunked(boolean value)

Gets or sets a value indicating whether [send chunked].

Value: ``` true ``` if [send chunked]; otherwise, ``` false ```.

Parameters:

Parameter Type Description
value boolean

moveMessage(ExchangeMessageInfo msgInfo, String destinationFolderUri)

public final void moveMessage(ExchangeMessageInfo msgInfo, String destinationFolderUri)

Moves the message.

Parameters:

Parameter Type Description
msgInfo ExchangeMessageInfo Represents the E-Mail message info fetched from the Exchange Store.
destinationFolderUri java.lang.String An URI of a destination folder.

moveMessage(ExchangeMessageInfo msgInfo, String destinationFolderUri, boolean overwrite)

public final void moveMessage(ExchangeMessageInfo msgInfo, String destinationFolderUri, boolean overwrite)

Moves the message.

Parameters:

Parameter Type Description
msgInfo ExchangeMessageInfo Represents the E-Mail message info fetched from the Exchange Store.
destinationFolderUri java.lang.String An URI of a destination folder.
overwrite boolean Specifies whether the server should overwrite a existing message while processing a MOVE operation.

moveMessage(String destinationFolderUri, String messageUri)

public final void moveMessage(String destinationFolderUri, String messageUri)

Moves the message.

Parameters:

Parameter Type Description
destinationFolderUri java.lang.String An URI of a destination folder.
messageUri java.lang.String Represents the uri of E-Mail message.

moveMessage(String destinationFolderUri, boolean overwrite, String messageUri)

public final void moveMessage(String destinationFolderUri, boolean overwrite, String messageUri)

Moves the message.

Parameters:

Parameter Type Description
destinationFolderUri java.lang.String An URI of a destination folder.
overwrite boolean Specifies whether the server should overwrite a existing message while processing a MOVE operation.
messageUri java.lang.String Represents the uri of E-Mail message.

moveItems(String destinationFolderUri, String[] itemsUriArray)

public final void moveItems(String destinationFolderUri, String[] itemsUriArray)

Moves items.

Parameters:

Parameter Type Description
destinationFolderUri java.lang.String The new destination for items.
itemsUriArray java.lang.String[] Items uri arrray

moveItems(String destinationFolderUri, boolean overwrite, String[] itemsUriArray)

public final void moveItems(String destinationFolderUri, boolean overwrite, String[] itemsUriArray)

Moves items.

Parameters:

Parameter Type Description
destinationFolderUri java.lang.String The new destination for items.
overwrite boolean Specifies whether the server should overwrite a existing message while processing a MOVE operation.
itemsUriArray java.lang.String[] Items uri arrray

getMailboxSize()

public final long getMailboxSize()

Get the size of the maibox

Returns: long - The size of the mailbox

getMailboxSize(String mailbox)

public final long getMailboxSize(String mailbox)

Get the size of the maibox

Parameters:

Parameter Type Description
mailbox java.lang.String A mailbox. Note: if it is set to ``` null ``` or ``` empty ``` the default mailbox will be used

Returns: long - The size of the mailbox

getVersionInfo()

public final String getVersionInfo()

Returns exchange server version info

Returns: java.lang.String - Returns exchange server version info

getMailboxInfo(String mailbox)

public final ExchangeMailboxInfo getMailboxInfo(String mailbox)

Gets the mailbox information

Parameters:

Parameter Type Description
mailbox java.lang.String A mailbox to read from. Note: if mailbox is set to ``` null ``` or ``` empty ``` the default mailbox will be used

Returns: ExchangeMailboxInfo - ExchangeMailboxInfo that represents mailbox information

listMessages(String folder, String messageClass, boolean recursive)

public final ExchangeMessageInfoCollection listMessages(String folder, String messageClass, boolean recursive)

Lists the messages.

Parameters:

Parameter Type Description
folder java.lang.String The folder.
messageClass java.lang.String The message class.
recursive boolean if set to ``` true ``` [recursive].

Returns: ExchangeMessageInfoCollection -

listMessages(String folder, boolean recursive)

public final ExchangeMessageInfoCollection listMessages(String folder, boolean recursive)

List the messages in the specified folder

Parameters:

Parameter Type Description
folder java.lang.String The folder Uri
recursive boolean Indicates whether recursive listing or not.

Returns: ExchangeMessageInfoCollection - A collection of message info

listMessages(String folder, String query)

public final ExchangeMessageInfoCollection listMessages(String folder, String query)

Lists the messages.

Parameters:

Parameter Type Description
folder java.lang.String The folder.
query java.lang.String The query.

Returns: ExchangeMessageInfoCollection -

listMessages(String folder, MailQuery query, boolean recursive)

public final ExchangeMessageInfoCollection listMessages(String folder, MailQuery query, boolean recursive)

Lists the messages.

Parameters:

Parameter Type Description
folder java.lang.String The Uri of folder that contains messages.
query MailQuery The MailQuery that represents search criteria.
recursive boolean Indicates whether recursive listing or not.

Returns: ExchangeMessageInfoCollection - The message info collection.

listMessagesById(String folder, String messageId)

public final ExchangeMessageInfoCollection listMessagesById(String folder, String messageId)

Lists the messages by id.

Parameters:

Parameter Type Description
folder java.lang.String The folder.
messageId java.lang.String The message id.

Returns: ExchangeMessageInfoCollection -

listMessagesByOption(String folder, int options)

public final ExchangeMessageInfoCollection listMessagesByOption(String folder, int options)

Lists the mail message in the specified folder.

Parameters:

Parameter Type Description
folder java.lang.String The folder url
options int Specifies the settings of listing

Returns: ExchangeMessageInfoCollection - A ExchangeMessageInfoCollection collection.

saveMessage(String messageUri, String path)

public final void saveMessage(String messageUri, String path)

Saves mail message specified by the uri to local file system. The mail message file is RFC 822 compliant format (EML).

Parameters:

Parameter Type Description
messageUri java.lang.String The Uri of the mail message
path java.lang.String The target path to save the message

if you want to parse the mail message files, use MailMessage. |

saveMessage(String messageUri, OutputStream stream)

public final void saveMessage(String messageUri, OutputStream stream)

Saves the message.

Parameters:

Parameter Type Description
messageUri java.lang.String The message URI.
stream java.io.OutputStream The stream.

saveMessageInternal(String messageUri, System.IO.Stream stream)

public void saveMessageInternal(String messageUri, System.IO.Stream stream)

Parameters:

Parameter Type Description
messageUri java.lang.String
stream com.aspose.ms.System.IO.Stream

send(MailMessage message)

public final void send(MailMessage message)

Sends the mail message.

Parameters:

Parameter Type Description
message MailMessage The mail message to be sent.

setReadFlag(String messageUri)

public final void setReadFlag(String messageUri)

Marks the specifeid message as read.

Parameters:

Parameter Type Description
messageUri java.lang.String A message uri.

setReadFlag(String messageUri, boolean suppressReceipt)

public final void setReadFlag(String messageUri, boolean suppressReceipt)

Marks the specifeid message as read.

Parameters:

Parameter Type Description
messageUri java.lang.String A message uri.
suppressReceipt boolean A value indicating whether the sending a read receipt should be suppressed.

listPublicFolders()

public final ExchangeFolderInfoCollection listPublicFolders()

Gets collection of public folders from root public folder

Returns: ExchangeFolderInfoCollection - ExchangeFolderInfoCollection that contains subfolders from the root public folder

listSubFolders(String parentFolderUri)

public final ExchangeFolderInfoCollection listSubFolders(String parentFolderUri)

Gets collection of child folders from parent

Parameters:

Parameter Type Description
parentFolderUri java.lang.String The uri of the parent folder

Returns: ExchangeFolderInfoCollection - ExchangeFolderInfoCollection that contains subfolders from the parent folder

fetchMessage(String messageUri)

public final MailMessage fetchMessage(String messageUri)

Fetches the mail message with specified uri.

Parameters:

Parameter Type Description
messageUri java.lang.String The message uri.

Returns: MailMessage - A MailMessage object contains the message.

fetchMapiMessage(String messageUri)

public final MapiMessage fetchMapiMessage(String messageUri)

Fetches the mapi message with specified uri.

Parameters:

Parameter Type Description
messageUri java.lang.String The message uri.

Returns: MapiMessage - A MapiMessage object contains the message.

deleteMessage(String messageUri)

public final void deleteMessage(String messageUri)

Deletes the mail message.

Parameters:

Parameter Type Description
messageUri java.lang.String The message uri.

deleteMessage(String messageUri, boolean suppressReceipt)

public final void deleteMessage(String messageUri, boolean suppressReceipt)

Deletes the mail message.

Parameters:

Parameter Type Description
messageUri java.lang.String The message uri.
suppressReceipt boolean A value indicating whether the sending a non-read report should be suppressed.

appendMessage(String folder, MailMessage message)

public final String appendMessage(String folder, MailMessage message)

Uploads the mail message to the specified folder

Parameters:

Parameter Type Description
folder java.lang.String A folder to which message is uploaded
message MailMessage A message to upload

Returns: java.lang.String - An uri of created message

appendMessage(String folder, MailMessage message, boolean markAsSent)

public final String appendMessage(String folder, MailMessage message, boolean markAsSent)

Uploads the mail message to the specified folder

Parameters:

Parameter Type Description
folder java.lang.String An uri of folder to which message is uploaded
message MailMessage A message to upload
markAsSent boolean A value indicating whether the message should be appended as a sent message or a draft.

Returns: java.lang.String - An uri of created message

listMessagesByOption(String folder, int maxNumberOfMessages, int options)

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

List the messages in the specified folder

Parameters:

Parameter Type Description
folder java.lang.String The folder Uri
maxNumberOfMessages int Maximum number of messages
options int Specifies the settings of listing

Returns: ExchangeMessageInfoCollection - A collection of message info

fetchAttachment(String attachmentUri)

public final Attachment fetchAttachment(String attachmentUri)

Fetches the attachment

Parameters:

Parameter Type Description
attachmentUri java.lang.String The attachment uri. (Attachment uri can be retrieved using ListMessages(folder, ExchangeListMessagesOptions.FetchAttachmentInformation) method)

Returns: Attachment - Attachment that represents fetched attachment

backup(ExchangeFolderInfoCollection folders, String fileName, int options)

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

Backups the content of the specified folders

Parameters:

Parameter Type Description
folders ExchangeFolderInfoCollection A folders to backup
fileName java.lang.String A path to the presonal storage file
options int A backup options

backup(ExchangeFolderInfoCollection folders, OutputStream stream, int options)

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

Backups the content of the specified folders

Parameters:

Parameter Type Description
folders ExchangeFolderInfoCollection A folders to backup
stream java.io.OutputStream A stream to write into
options int A backup options

backupInternal(ExchangeFolderInfoCollection folders, System.IO.Stream stream, int options)

public void backupInternal(ExchangeFolderInfoCollection folders, System.IO.Stream stream, int options)

Parameters:

Parameter Type Description
folders ExchangeFolderInfoCollection
stream com.aspose.ms.System.IO.Stream
options int

getFolderInfo(String folderUri)

public final ExchangeFolderInfo getFolderInfo(String folderUri)

Gets the folder information.

Parameters:

Parameter Type Description
folderUri java.lang.String A folder uri.

Returns: ExchangeFolderInfo - A ExchangeFolderInfo that represents the folder information.

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

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

Checks whether the specified folder exists.

Parameters:

Parameter Type Description
parentFolderUri java.lang.String An uri of parent folder.
folderName java.lang.String A folder name.
folder com.aspose.email.ExchangeFolderInfo[] A ExchangeFolderInfo that represents the found folder information, if folder exists.

Returns: boolean - ``` true ``` if the specified folder exists in the specified parent folder; otherwise, ``` false ```.

createFolder(String parentFolderUri, String name)

public ExchangeFolderInfo createFolder(String parentFolderUri, String name)

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

Parameters:

Parameter Type Description
parentFolderUri java.lang.String An uri of parent folder.
name java.lang.String A name of folder to be created.

Returns: ExchangeFolderInfo

deleteFolder(String folderUri)

public final void deleteFolder(String folderUri)

Deletes the folder

Parameters:

Parameter Type Description
folderUri java.lang.String The folder Uri

restore(String fileName, int options)

public final void restore(String fileName, int options)

Restores exchange folders from the specified personal storage file.

Parameters:

Parameter Type Description
fileName java.lang.String A path to personal storage file.
options int Restore options.

restore(InputStream stream, int options)

public final void restore(InputStream stream, int options)

Restores exchange folders from the given personal storage.

Parameters:

Parameter Type Description
stream java.io.InputStream A stream containing personal storage.
options int Restore options.

restoreInternal(System.IO.Stream stream, int options)

public void restoreInternal(System.IO.Stream stream, int options)

Parameters:

Parameter Type Description
stream com.aspose.ms.System.IO.Stream
options int

restore(PersonalStorage pst, int options)

public final void restore(PersonalStorage pst, int options)

Restores exchange folders from the given personal storage.

Parameters:

Parameter Type Description
pst PersonalStorage A personal storage containing the backuped imap folders.
options int Restore options.

restore(String fileName, ExchangeFolderInfoCollection folders, int options)

public final void restore(String fileName, ExchangeFolderInfoCollection folders, int options)

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

Parameters:

Parameter Type Description
fileName java.lang.String A path to personal storage file.
folders ExchangeFolderInfoCollection A folders to be restored.
options int Restore options.

restore(InputStream stream, ExchangeFolderInfoCollection folders, int options)

public final void restore(InputStream stream, ExchangeFolderInfoCollection folders, int options)

Restores the specified exchange folders from the given personal storage.

Parameters:

Parameter Type Description
stream java.io.InputStream A stream containing personal storage.
folders ExchangeFolderInfoCollection A folders to be restored.
options int Restore options.

restoreInternal(System.IO.Stream stream, ExchangeFolderInfoCollection folders, int options)

public void restoreInternal(System.IO.Stream stream, ExchangeFolderInfoCollection folders, int options)

Parameters:

Parameter Type Description
stream com.aspose.ms.System.IO.Stream
folders ExchangeFolderInfoCollection
options int

restore(PersonalStorage pst, ExchangeFolderInfoCollection folders, int options)

public final void restore(PersonalStorage pst, ExchangeFolderInfoCollection folders, int options)

Restores the specified exchange folders from the given personal storage.

Parameters:

Parameter Type Description
pst PersonalStorage A personal storage containing the backuped exchange folders.
folders ExchangeFolderInfoCollection A folders to be restored.
options int Restore options.

createContact(Contact contact)

public final String createContact(Contact contact)

Creates a contact item in the Exchange store.

Parameters:

Parameter Type Description
contact Contact Contact item

Returns: java.lang.String - The contact Uri

deleteContact(Contact contact)

public final void deleteContact(Contact contact)

Deletes the contact.

Parameters:

Parameter Type Description
contact Contact Contact

deleteContact(MapiContact contact)

public final void deleteContact(MapiContact contact)

Deletes the contact.

Parameters:

Parameter Type Description
contact MapiContact Contact

deleteContact(String id)

public final void deleteContact(String id)

Deletes the contact.

Parameters:

Parameter Type Description
id java.lang.String The contact identifier.

getContacts(String folderUri)

public final Contact[] getContacts(String folderUri)

Lists contacts located in the specified folder on server

Parameters:

Parameter Type Description
folderUri java.lang.String The URI of folder

Returns: com.aspose.email.Contact[] - An array of read Contact that represents contact information

listContacts(String folderUri)

public final MapiContact[] listContacts(String folderUri)

Lists contacts located in the specified folder on server

Parameters:

Parameter Type Description
folderUri java.lang.String The URI of folder

Returns: com.aspose.email.MapiContact[] - An array of read MapiContact that represents contact information

resolveContacts(String unresolvedEntry)

public final 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:

Parameter Type Description
unresolvedEntry java.lang.String A name of contact to resolve.

Returns: com.aspose.email.Contact[] - An array of Contact objects.

listMailboxes()

public final MapiContactCollection listMailboxes()

Lists mailboxes in the global address list.

Returns: MapiContactCollection - A MapiContactCollection that represents contact information.

getMailboxes()

public final Contact[] getMailboxes()

Lists mailboxes in the global address list.

Returns: com.aspose.email.Contact[] - An array of Contact objects.

listSubFolders(ExchangeFolderInfo parentFolder)

public final ExchangeFolderInfoCollection listSubFolders(ExchangeFolderInfo parentFolder)

Gets collection of child public folders from parent

Parameters:

Parameter Type Description
parentFolder ExchangeFolderInfo The parent ExchangeFolderInfo

Returns: ExchangeFolderInfoCollection - ExchangeFolderInfoCollection that contains subfolders from the parent folder

listMessages(String folder)

public final ExchangeMessageInfoCollection listMessages(String folder)

Lists the messages.

Parameters:

Parameter Type Description
folder java.lang.String The folder.

Returns: ExchangeMessageInfoCollection - A ExchangeMessageInfoCollection

listMessages(String folder, int maxNumberOfMessages)

public final ExchangeMessageInfoCollection listMessages(String folder, int maxNumberOfMessages)

Lists the messages.

Parameters:

Parameter Type Description
folder java.lang.String The folder.
maxNumberOfMessages int Maximum number of messages

Returns: ExchangeMessageInfoCollection - A ExchangeMessageInfoCollection

listMessagesByMaxNumberOfMessages(String folder, int maxNumberOfMessages)

public final ExchangeMessageInfoCollection listMessagesByMaxNumberOfMessages(String folder, int maxNumberOfMessages)

Lists the messages.

Parameters:

Parameter Type Description
folder java.lang.String The folder.
maxNumberOfMessages int Maximum number of messages

Returns: ExchangeMessageInfoCollection - A ``` ExchangeMessageInfoCollection ```

folderExists(String parentFolderUri, String folderName)

public final boolean folderExists(String parentFolderUri, String folderName)

Checks whether the specified folder exists.

Parameters:

Parameter Type Description
parentFolderUri java.lang.String An uri of parent folder.
folderName java.lang.String A folder name.

Returns: boolean - ``` true ``` if the specified folder exists in the specified parent folder; otherwise, ``` false ```.