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

ConstructorDescription
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

MethodDescription
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
backup(ExchangeFolderInfoCollection folders, OutputStream stream, int options)Backups the content of the specified folders
backup(ExchangeFolderInfoCollection folders, String fileName, int options)Backups the content of the specified folders
backupInternal(ExchangeFolderInfoCollection folders, System.IO.Stream stream, int options)
close()
createContact(Contact contact)Creates a contact item in the Exchange store.
createFolder(String parentFolderUri, String name)Creates the new folder with the specified name in the specified parent folder.
deleteContact(Contact contact)Deletes the contact.
deleteContact(MapiContact contact)Deletes the contact.
deleteContact(String id)Deletes the contact.
deleteFolder(String folderUri)Deletes the folder
deleteMessage(String messageUri)Deletes the mail message.
deleteMessage(String messageUri, boolean suppressReceipt)Deletes the mail message.
dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
equals(Object arg0)
fetchAttachment(String attachmentUri)Fetches the attachment
fetchMapiMessage(String messageUri)Fetches the mapi message with specified uri.
fetchMessage(String messageUri)Fetches the mail message with specified uri.
folderExists(String parentFolderUri, String folderName)Checks whether the specified folder exists.
folderExists(String parentFolderUri, String folderName, ExchangeFolderInfo[] folder)Checks whether the specified folder exists.
getClass()
getClientCertificate()Gets or sets the client certificate.
getContacts(String folderUri)Lists contacts located in the specified folder on server
getCookieContainer()Gets or sets the cookie container.
getCredentials()Gets or sets the credentials
getEncoding()Gets or sets the encoding.
getFolderInfo(String folderUri)Gets the folder information.
getKeepAlive()Indicates whether to keep alive.
getLogFileName()Gets or sets log file name
getMailboxInfo()Gets the mailbox information.
getMailboxInfo(String mailbox)Gets the mailbox information
getMailboxSize()Get the size of the maibox
getMailboxSize(String mailbox)Get the size of the maibox
getMailboxUri()Gets or sets the mailbox uri
getMailboxes()Lists mailboxes in the global address list.
getPreAuthenticate()Indicates whether to do pre-authentication.
getProxy()Gets or sets the proxy.
getSendChunked()Gets or sets a value indicating whether [send chunked].
getTimeout()Gets or sets the number of milliseconds to wait before the operation times out.
getUseDateInLogFileName()Gets or sets value which indicates if date has to be used in log file name.
getVersionInfo()Returns exchange server version info
hashCode()
listContacts(String folderUri)Lists contacts located in the specified folder on server
listMailboxes()Lists mailboxes in the global address list.
listMessages(String folder)Lists the messages.
listMessages(String folder, boolean recursive)List the messages in the specified folder
listMessages(String folder, MailQuery query, boolean recursive)Lists the messages.
listMessages(String folder, int maxNumberOfMessages)Lists the messages.
listMessages(String folder, String query)Lists the messages.
listMessages(String folder, String messageClass, boolean recursive)Lists the messages.
listMessagesById(String folder, String messageId)Lists the messages by id.
listMessagesByMaxNumberOfMessages(String folder, int maxNumberOfMessages)Lists the messages.
listMessagesByOption(String folder, int options)Lists the mail message in the specified folder.
listMessagesByOption(String folder, int maxNumberOfMessages, int options)List the messages in the specified folder
listPublicFolders()Gets collection of public folders from root public folder
listSubFolders(ExchangeFolderInfo parentFolder)Gets collection of child public folders from parent
listSubFolders(String parentFolderUri)Gets collection of child folders from parent
moveItems(String destinationFolderUri, boolean overwrite, String[] itemsUriArray)Moves items.
moveItems(String destinationFolderUri, String[] itemsUriArray)Moves items.
moveMessage(ExchangeMessageInfo msgInfo, String destinationFolderUri)Moves the message.
moveMessage(ExchangeMessageInfo msgInfo, String destinationFolderUri, boolean overwrite)Moves the message.
moveMessage(String destinationFolderUri, boolean overwrite, String messageUri)Moves the message.
moveMessage(String destinationFolderUri, String messageUri)Moves the message.
notify()
notifyAll()
resetLogSettings()Resets logging settings to default.
resolveContacts(String unresolvedEntry)Resolves ambiguous mailbox display names.
restore(PersonalStorage pst, ExchangeFolderInfoCollection folders, int options)Restores the specified exchange folders from the given personal storage.
restore(PersonalStorage pst, int options)Restores exchange folders from the given personal storage.
restore(InputStream stream, ExchangeFolderInfoCollection folders, int options)Restores the specified exchange folders from the given personal storage.
restore(InputStream stream, 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(String fileName, int options)Restores exchange folders from the specified personal storage file.
restoreInternal(System.IO.Stream stream, ExchangeFolderInfoCollection folders, int options)
restoreInternal(System.IO.Stream stream, int options)
saveMessage(String messageUri, OutputStream stream)Saves the message.
saveMessage(String messageUri, String path)Saves mail message specified by the uri to local file system.
saveMessageInternal(String messageUri, System.IO.Stream stream)
send(MailMessage message)Sends the mail message.
setClientCertificate(System.Security.Cryptography.X509Certificates.X509Certificate value)Gets or sets the client certificate.
setCommonLogFileName(String value)Sets log file name for all sessions.
setCookieContainer(System.Net.CookieContainer value)Gets or sets the cookie container.
setCredentials(System.Net.ICredentials value)Gets or sets the credentials
setEncoding(Charset value)Gets or sets the encoding.
setKeepAlive(boolean value)Indicates whether to keep alive.
setLogFileName(String value)Gets or sets log file name
setMailboxUri(String value)Gets or sets the mailbox uri
setPreAuthenticate(boolean value)Indicates whether to do pre-authentication.
setProxy(System.Net.WebProxy value)Gets or sets the proxy.
setReadFlag(String messageUri)Marks the specifeid message as read.
setReadFlag(String messageUri, boolean suppressReceipt)Marks the specifeid message as read.
setSendChunked(boolean value)Gets or sets a value indicating whether [send chunked].
setTimeout(int value)Gets or sets the number of milliseconds to wait before the operation times out.
setUseDateInLogFileName(boolean value)Gets or sets value which indicates if date has to be used in log file name.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

ExchangeClient(String mailboxUri, String username, String password)

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

Initialize a new instance of the class ExchangeClient

Parameters:

ParameterTypeDescription
mailboxUrijava.lang.StringThe url of the mailbox
usernamejava.lang.StringThe username of the mailbox
passwordjava.lang.StringThe 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:

ParameterTypeDescription
mailboxUrijava.lang.StringThe url of the mailbox
usernamejava.lang.StringThe username of the mailbox
passwordjava.lang.StringThe password of the mailbox
domainjava.lang.StringThe 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:

ParameterTypeDescription
mailboxUrijava.lang.StringThe url of the mailbox
credentialscom.aspose.ms.System.Net.ICredentialsThe credentials used to log in

appendMessage(String folder, MailMessage message)

public final String appendMessage(String folder, MailMessage message)

Uploads the mail message to the specified folder

Parameters:

ParameterTypeDescription
folderjava.lang.StringA folder to which message is uploaded
messageMailMessageA 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:

ParameterTypeDescription
folderjava.lang.StringAn uri of folder to which message is uploaded
messageMailMessageA message to upload
markAsSentbooleanA value indicating whether the message should be appended as a sent message or a draft.

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

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:

ParameterTypeDescription
foldersExchangeFolderInfoCollectionA folders to backup
streamjava.io.OutputStreamA stream to write into
optionsintA backup options

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:

ParameterTypeDescription
foldersExchangeFolderInfoCollectionA folders to backup
fileNamejava.lang.StringA path to the presonal storage file
optionsintA backup options

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

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

Parameters:

ParameterTypeDescription
foldersExchangeFolderInfoCollection
streamcom.aspose.ms.System.IO.Stream
optionsint

close()

public void close()

createContact(Contact contact)

public final String createContact(Contact contact)

Creates a contact item in the Exchange store.

Parameters:

ParameterTypeDescription
contactContactContact item

Returns: java.lang.String - The contact Uri

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:

ParameterTypeDescription
parentFolderUrijava.lang.StringAn uri of parent folder.
namejava.lang.StringA name of folder to be created.

Returns: ExchangeFolderInfo

deleteContact(Contact contact)

public final void deleteContact(Contact contact)

Deletes the contact.

Parameters:

ParameterTypeDescription
contactContactContact

deleteContact(MapiContact contact)

public final void deleteContact(MapiContact contact)

Deletes the contact.

Parameters:

ParameterTypeDescription
contactMapiContactContact

deleteContact(String id)

public final void deleteContact(String id)

Deletes the contact.

Parameters:

ParameterTypeDescription
idjava.lang.StringThe contact identifier.

deleteFolder(String folderUri)

public final void deleteFolder(String folderUri)

Deletes the folder

Parameters:

ParameterTypeDescription
folderUrijava.lang.StringThe folder Uri

deleteMessage(String messageUri)

public final void deleteMessage(String messageUri)

Deletes the mail message.

Parameters:

ParameterTypeDescription
messageUrijava.lang.StringThe message uri.

deleteMessage(String messageUri, boolean suppressReceipt)

public final void deleteMessage(String messageUri, boolean suppressReceipt)

Deletes the mail message.

Parameters:

ParameterTypeDescription
messageUrijava.lang.StringThe message uri.
suppressReceiptbooleanA value indicating whether the sending a non-read report should be suppressed.

dispose()

public void dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

fetchAttachment(String attachmentUri)

public final Attachment fetchAttachment(String attachmentUri)

Fetches the attachment

Parameters:

ParameterTypeDescription
attachmentUrijava.lang.StringThe attachment uri. (Attachment uri can be retrieved using ListMessages(folder, ExchangeListMessagesOptions.FetchAttachmentInformation) method)

Returns: Attachment - Attachment that represents fetched attachment

fetchMapiMessage(String messageUri)

public final MapiMessage fetchMapiMessage(String messageUri)

Fetches the mapi message with specified uri.

Parameters:

ParameterTypeDescription
messageUrijava.lang.StringThe message uri.

Returns: MapiMessage - A MapiMessage object contains the message.

fetchMessage(String messageUri)

public final MailMessage fetchMessage(String messageUri)

Fetches the mail message with specified uri.

Parameters:

ParameterTypeDescription
messageUrijava.lang.StringThe message uri.

Returns: MailMessage - A MailMessage object contains the message.

folderExists(String parentFolderUri, String folderName)

public final boolean folderExists(String parentFolderUri, String folderName)

Checks whether the specified folder exists.

Parameters:

ParameterTypeDescription
parentFolderUrijava.lang.StringAn uri of parent folder.
folderNamejava.lang.StringA folder name.

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

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

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

Checks whether the specified folder exists.

Parameters:

ParameterTypeDescription
parentFolderUrijava.lang.StringAn uri of parent folder.
folderNamejava.lang.StringA folder name.
folderExchangeFolderInfo[]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 .

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getClientCertificate()

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

Gets or sets the client certificate.

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

getContacts(String folderUri)

public final Contact[] getContacts(String folderUri)

Lists contacts located in the specified folder on server

Parameters:

ParameterTypeDescription
folderUrijava.lang.StringThe URI of folder

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

getCookieContainer()

public final System.Net.CookieContainer getCookieContainer()

Gets or sets the cookie container.

Value: The cookie container.

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

getCredentials()

public System.Net.ICredentials getCredentials()

Gets or sets the credentials

Value: ICredentials

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

getEncoding()

public final Charset getEncoding()

Gets or sets the encoding.

Returns: java.nio.charset.Charset

getFolderInfo(String folderUri)

public final ExchangeFolderInfo getFolderInfo(String folderUri)

Gets the folder information.

Parameters:

ParameterTypeDescription
folderUrijava.lang.StringA folder uri.

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

getKeepAlive()

public final boolean getKeepAlive()

Indicates whether to keep alive.

Returns: boolean

getLogFileName()

public final String getLogFileName()

Gets or sets log file name

Returns: java.lang.String

getMailboxInfo()

public final ExchangeMailboxInfo getMailboxInfo()

Gets the mailbox information.

Returns: ExchangeMailboxInfo

getMailboxInfo(String mailbox)

public final ExchangeMailboxInfo getMailboxInfo(String mailbox)

Gets the mailbox information

Parameters:

ParameterTypeDescription
mailboxjava.lang.StringA 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

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:

ParameterTypeDescription
mailboxjava.lang.StringA mailbox. Note: if it is set to null or empty the default mailbox will be used

Returns: long - The size of the mailbox

getMailboxUri()

public String getMailboxUri()

Gets or sets the mailbox uri

Value: Uri of the mailbox

Returns: java.lang.String

getMailboxes()

public final Contact[] getMailboxes()

Lists mailboxes in the global address list.

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

getPreAuthenticate()

public final boolean getPreAuthenticate()

Indicates whether to do pre-authentication.

Returns: boolean

getProxy()

public System.Net.WebProxy getProxy()

Gets or sets the proxy.

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

getSendChunked()

public final boolean getSendChunked()

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

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

Returns: boolean

getTimeout()

public int getTimeout()

Gets or sets the number of milliseconds to wait before the operation times out. The default value is 100,000 milliseconds (100 seconds).

Value: Timeout in milliseconds

Returns: int

getUseDateInLogFileName()

public final boolean getUseDateInLogFileName()

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

Returns: boolean

getVersionInfo()

public final String getVersionInfo()

Returns exchange server version info

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

hashCode()

public native int hashCode()

Returns: int

listContacts(String folderUri)

public final MapiContact[] listContacts(String folderUri)

Lists contacts located in the specified folder on server

Parameters:

ParameterTypeDescription
folderUrijava.lang.StringThe URI of folder

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

listMailboxes()

public final MapiContactCollection listMailboxes()

Lists mailboxes in the global address list.

Returns: MapiContactCollection - A MapiContactCollection that represents contact information.

listMessages(String folder)

public final ExchangeMessageInfoCollection listMessages(String folder)

Lists the messages.

Parameters:

ParameterTypeDescription
folderjava.lang.StringThe folder.

Returns: ExchangeMessageInfoCollection - A ExchangeMessageInfoCollection

listMessages(String folder, boolean recursive)

public final ExchangeMessageInfoCollection listMessages(String folder, boolean recursive)

List the messages in the specified folder

Parameters:

ParameterTypeDescription
folderjava.lang.StringThe folder Uri
recursivebooleanIndicates whether recursive listing or not.

Returns: ExchangeMessageInfoCollection - A collection of message info

listMessages(String folder, MailQuery query, boolean recursive)

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

Lists the messages.

Parameters:

ParameterTypeDescription
folderjava.lang.StringThe Uri of folder that contains messages.
queryMailQueryThe MailQuery that represents search criteria.
recursivebooleanIndicates whether recursive listing or not.

Returns: ExchangeMessageInfoCollection - The message info collection.

listMessages(String folder, int maxNumberOfMessages)

public final ExchangeMessageInfoCollection listMessages(String folder, int maxNumberOfMessages)

Lists the messages.

Parameters:

ParameterTypeDescription
folderjava.lang.StringThe folder.
maxNumberOfMessagesintMaximum number of messages

Returns: ExchangeMessageInfoCollection - A ExchangeMessageInfoCollection

listMessages(String folder, String query)

public final ExchangeMessageInfoCollection listMessages(String folder, String query)

Lists the messages.

Parameters:

ParameterTypeDescription
folderjava.lang.StringThe folder.
queryjava.lang.StringThe query.

Returns: ExchangeMessageInfoCollection -

listMessages(String folder, String messageClass, boolean recursive)

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

Lists the messages.

Parameters:

ParameterTypeDescription
folderjava.lang.StringThe folder.
messageClassjava.lang.StringThe message class.
recursivebooleanif set to true [recursive].

Returns: ExchangeMessageInfoCollection -

listMessagesById(String folder, String messageId)

public final ExchangeMessageInfoCollection listMessagesById(String folder, String messageId)

Lists the messages by id.

Parameters:

ParameterTypeDescription
folderjava.lang.StringThe folder.
messageIdjava.lang.StringThe message id.

Returns: ExchangeMessageInfoCollection -

listMessagesByMaxNumberOfMessages(String folder, int maxNumberOfMessages)

public final ExchangeMessageInfoCollection listMessagesByMaxNumberOfMessages(String folder, int maxNumberOfMessages)

Lists the messages.

Parameters:

ParameterTypeDescription
folderjava.lang.StringThe folder.
maxNumberOfMessagesintMaximum number of messages

Returns: ExchangeMessageInfoCollection - A ExchangeMessageInfoCollection

listMessagesByOption(String folder, int options)

public final ExchangeMessageInfoCollection listMessagesByOption(String folder, int options)

Lists the mail message in the specified folder.

Parameters:

ParameterTypeDescription
folderjava.lang.StringThe folder url
optionsintSpecifies the settings of listing

Returns: ExchangeMessageInfoCollection - A ExchangeMessageInfoCollection collection.

listMessagesByOption(String folder, int maxNumberOfMessages, int options)

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

List the messages in the specified folder

Parameters:

ParameterTypeDescription
folderjava.lang.StringThe folder Uri
maxNumberOfMessagesintMaximum number of messages
optionsintSpecifies the settings of listing

Returns: ExchangeMessageInfoCollection - A collection of message info

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(ExchangeFolderInfo parentFolder)

public final ExchangeFolderInfoCollection listSubFolders(ExchangeFolderInfo parentFolder)

Gets collection of child public folders from parent

Parameters:

ParameterTypeDescription
parentFolderExchangeFolderInfoThe parent ExchangeFolderInfo

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

listSubFolders(String parentFolderUri)

public final ExchangeFolderInfoCollection listSubFolders(String parentFolderUri)

Gets collection of child folders from parent

Parameters:

ParameterTypeDescription
parentFolderUrijava.lang.StringThe uri of the parent folder

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

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

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

Moves items.

Parameters:

ParameterTypeDescription
destinationFolderUrijava.lang.StringThe new destination for items.
overwritebooleanSpecifies whether the server should overwrite a existing message while processing a MOVE operation.
itemsUriArrayjava.lang.String[]Items uri arrray

moveItems(String destinationFolderUri, String[] itemsUriArray)

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

Moves items.

Parameters:

ParameterTypeDescription
destinationFolderUrijava.lang.StringThe new destination for items.
itemsUriArrayjava.lang.String[]Items uri arrray

moveMessage(ExchangeMessageInfo msgInfo, String destinationFolderUri)

public final void moveMessage(ExchangeMessageInfo msgInfo, String destinationFolderUri)

Moves the message.

Parameters:

ParameterTypeDescription
msgInfoExchangeMessageInfoRepresents the E-Mail message info fetched from the Exchange Store.
destinationFolderUrijava.lang.StringAn 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:

ParameterTypeDescription
msgInfoExchangeMessageInfoRepresents the E-Mail message info fetched from the Exchange Store.
destinationFolderUrijava.lang.StringAn URI of a destination folder.
overwritebooleanSpecifies whether the server should overwrite a existing message while processing a MOVE operation.

moveMessage(String destinationFolderUri, boolean overwrite, String messageUri)

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

Moves the message.

Parameters:

ParameterTypeDescription
destinationFolderUrijava.lang.StringAn URI of a destination folder.
overwritebooleanSpecifies whether the server should overwrite a existing message while processing a MOVE operation.
messageUrijava.lang.StringRepresents the uri of E-Mail message.

moveMessage(String destinationFolderUri, String messageUri)

public final void moveMessage(String destinationFolderUri, String messageUri)

Moves the message.

Parameters:

ParameterTypeDescription
destinationFolderUrijava.lang.StringAn URI of a destination folder.
messageUrijava.lang.StringRepresents the uri of E-Mail message.

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

resetLogSettings()

public final void resetLogSettings()

Resets logging settings to default.

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:

ParameterTypeDescription
unresolvedEntryjava.lang.StringA name of contact to resolve.

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

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:

ParameterTypeDescription
pstPersonalStorageA personal storage containing the backuped exchange folders.
foldersExchangeFolderInfoCollectionA folders to be restored.
optionsintRestore options.

restore(PersonalStorage pst, int options)

public final void restore(PersonalStorage pst, int options)

Restores exchange folders from the given personal storage.

Parameters:

ParameterTypeDescription
pstPersonalStorageA personal storage containing the backuped imap folders.
optionsintRestore 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:

ParameterTypeDescription
streamjava.io.InputStreamA stream containing personal storage.
foldersExchangeFolderInfoCollectionA folders to be restored.
optionsintRestore options.

restore(InputStream stream, int options)

public final void restore(InputStream stream, int options)

Restores exchange folders from the given personal storage.

Parameters:

ParameterTypeDescription
streamjava.io.InputStreamA stream containing personal storage.
optionsintRestore 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:

ParameterTypeDescription
fileNamejava.lang.StringA path to personal storage file.
foldersExchangeFolderInfoCollectionA folders to be restored.
optionsintRestore options.

restore(String fileName, int options)

public final void restore(String fileName, int options)

Restores exchange folders from the specified personal storage file.

Parameters:

ParameterTypeDescription
fileNamejava.lang.StringA path to personal storage file.
optionsintRestore options.

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

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

Parameters:

ParameterTypeDescription
streamcom.aspose.ms.System.IO.Stream
foldersExchangeFolderInfoCollection
optionsint

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

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

Parameters:

ParameterTypeDescription
streamcom.aspose.ms.System.IO.Stream
optionsint

saveMessage(String messageUri, OutputStream stream)

public final void saveMessage(String messageUri, OutputStream stream)

Saves the message.

Parameters:

ParameterTypeDescription
messageUrijava.lang.StringThe message URI.
streamjava.io.OutputStreamThe stream.

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:

ParameterTypeDescription
messageUrijava.lang.StringThe Uri of the mail message
pathjava.lang.StringThe target path to save the message

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

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

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

Parameters:

ParameterTypeDescription
messageUrijava.lang.String
streamcom.aspose.ms.System.IO.Stream

send(MailMessage message)

public final void send(MailMessage message)

Sends the mail message.

Parameters:

ParameterTypeDescription
messageMailMessageThe mail message to be sent.

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

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

Gets or sets the client certificate.

Parameters:

ParameterTypeDescription
valuecom.aspose.ms.System.Security.Cryptography.X509Certificates.X509Certificate

setCommonLogFileName(String value)

public static void setCommonLogFileName(String value)

Sets log file name for all sessions.

Parameters:

ParameterTypeDescription
valuejava.lang.StringThe log file name.

setCookieContainer(System.Net.CookieContainer value)

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

Gets or sets the cookie container.

Value: The cookie container.

Parameters:

ParameterTypeDescription
valuecom.aspose.ms.System.Net.CookieContainer

setCredentials(System.Net.ICredentials value)

public void setCredentials(System.Net.ICredentials value)

Gets or sets the credentials

Value: ICredentials

Parameters:

ParameterTypeDescription
valuecom.aspose.ms.System.Net.ICredentials

setEncoding(Charset value)

public final void setEncoding(Charset value)

Gets or sets the encoding.

Parameters:

ParameterTypeDescription
valuejava.nio.charset.Charset

setKeepAlive(boolean value)

public final void setKeepAlive(boolean value)

Indicates whether to keep alive.

Parameters:

ParameterTypeDescription
valueboolean

setLogFileName(String value)

public final void setLogFileName(String value)

Gets or sets log file name

Parameters:

ParameterTypeDescription
valuejava.lang.String

setMailboxUri(String value)

public void setMailboxUri(String value)

Gets or sets the mailbox uri

Value: Uri of the mailbox

Parameters:

ParameterTypeDescription
valuejava.lang.String

setPreAuthenticate(boolean value)

public final void setPreAuthenticate(boolean value)

Indicates whether to do pre-authentication.

Parameters:

ParameterTypeDescription
valueboolean

setProxy(System.Net.WebProxy value)

public void setProxy(System.Net.WebProxy value)

Gets or sets the proxy.

Parameters:

ParameterTypeDescription
valuecom.aspose.ms.System.Net.WebProxy

setReadFlag(String messageUri)

public final void setReadFlag(String messageUri)

Marks the specifeid message as read.

Parameters:

ParameterTypeDescription
messageUrijava.lang.StringA message uri.

setReadFlag(String messageUri, boolean suppressReceipt)

public final void setReadFlag(String messageUri, boolean suppressReceipt)

Marks the specifeid message as read.

Parameters:

ParameterTypeDescription
messageUrijava.lang.StringA message uri.
suppressReceiptbooleanA value indicating whether the sending a read receipt should be suppressed.

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:

ParameterTypeDescription
valueboolean

setTimeout(int value)

public void setTimeout(int value)

Gets or sets the number of milliseconds to wait before the operation times out. The default value is 100,000 milliseconds (100 seconds).

Value: Timeout in milliseconds

Parameters:

ParameterTypeDescription
valueint

setUseDateInLogFileName(boolean value)

public final void setUseDateInLogFileName(boolean value)

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

Parameters:

ParameterTypeDescription
valueboolean

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int