SmtpClient

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

All Implemented Interfaces: com.aspose.email.IMailTransferAgent

public final class SmtpClient extends EmailClient implements IMailTransferAgent

Allows applications to send messages by using the Simple Mail Transfer Protocol (SMTP).

Constructors

ConstructorDescription
SmtpClient()Initializes a new instance of the SmtpClient class.
SmtpClient(String host)Initializes a new instance of the SmtpClient class.
SmtpClient(String host, short securityOptions)Initializes a new instance of the SmtpClient class.
SmtpClient(String host, int port)Initializes a new instance of the SmtpClient class.
SmtpClient(String host, int port, int securityOptions)Initializes a new instance of the SmtpClient class.
SmtpClient(String host, String username, String password)Initializes a new instance of the SmtpClient class.
SmtpClient(String host, String username, String password, int securityOptions)Initializes a new instance of the SmtpClient class.
SmtpClient(String host, int port, String username, String password)Initializes a new instance of the SmtpClient class.
SmtpClient(String host, int port, String username, String password, int securityOptions)Initializes a new instance of the SmtpClient class.
SmtpClient(String host, String username, String authInfo, boolean useOAuth)Initializes a new instance of the SmtpClient class.
SmtpClient(String host, String username, String authInfo, boolean useOAuth, int securityOptions)Initializes a new instance of the SmtpClient class.
SmtpClient(String host, int port, String username, String authInfo, boolean useOAuth)Initializes a new instance of the SmtpClient class.
SmtpClient(String host, int port, String username, String authInfo, boolean useOAuth, int securityOptions)Initializes a new instance of the SmtpClient class.
SmtpClient(String host, String username, ITokenProvider tokenProvider)Initializes a new instance of the SmtpClient class.
SmtpClient(String host, String username, ITokenProvider tokenProvider, int securityOptions)Initializes a new instance of the SmtpClient class.
SmtpClient(String host, int port, String username, ITokenProvider tokenProvider)Initializes a new instance of the SmtpClient class.
SmtpClient(String host, int port, String username, ITokenProvider tokenProvider, int securityOptions)Initializes a new instance of the SmtpClient class.

Methods

MethodDescription
beginForward(IConnection connection, String sender, MailAddressCollection recipients, MailMessage message)Begins forward email asynchronously.
beginForward(IConnection connection, String sender, MailAddressCollection recipients, MailMessage message, System.AsyncCallback callback)Begins forward email asynchronously.
beginForward(IConnection connection, String sender, MailAddressCollection recipients, MailMessage message, System.AsyncCallback callback, Object state)Begins forward email asynchronously.
beginForward(IConnection connection, String sender, String recipient, MailMessage message)Begins forward email asynchronously.
beginForward(IConnection connection, String sender, String recipient, MailMessage message, System.AsyncCallback callback)Begins forward email asynchronously.
beginForward(IConnection connection, String sender, String recipient, MailMessage message, System.AsyncCallback callback, Object state)Begins forward email asynchronously.
beginForward(String sender, MailAddressCollection recipients, MailMessage message)Begins forward email asynchronously.
beginForward(String sender, MailAddressCollection recipients, MailMessage message, System.AsyncCallback callback)Begins forward email asynchronously.
beginForward(String sender, MailAddressCollection recipients, MailMessage message, System.AsyncCallback callback, Object state)Begins forward email asynchronously.
beginForward(String sender, String recipient, MailMessage message)Begins forward email asynchronously.
beginForward(String sender, String recipient, MailMessage message, System.AsyncCallback callback)Begins forward email asynchronously.
beginForward(String sender, String recipient, MailMessage message, System.AsyncCallback callback, Object state)Begins forward email asynchronously.
beginNoop()Begins to execute ‘No operation’ command
beginNoop(IConnection connection)Begins to execute ‘No operation’ command
beginNoop(IConnection connection, System.AsyncCallback callback)Begins to execute ‘No operation’ command
beginNoop(IConnection connection, System.AsyncCallback callback, Object state)Begins to execute ‘No operation’ command
beginNoop(System.AsyncCallback callback)Begins to execute ‘No operation’ command
beginNoop(System.AsyncCallback callback, Object state)Begins to execute ‘No operation’ command
beginSend(IConnection connection, MailMessage message)Begins sending email asynchronously.
beginSend(IConnection connection, MailMessage message, System.AsyncCallback callback)Begins sending email asynchronously.
beginSend(IConnection connection, MailMessage message, System.AsyncCallback callback, Object state)Begins sending email asynchronously.
beginSend(IConnection connection, MailMessage[] messages)Begins sending email asynchronously.
beginSend(IConnection connection, Iterable messages)Begins sending email asynchronously.
beginSend(IConnection connection, Iterable messages, System.AsyncCallback callback)Begins sending email asynchronously.
beginSend(IConnection connection, Iterable messages, System.AsyncCallback callback, Object state)Begins sending email asynchronously.
beginSend(IConnection connection, Iterable messages, System.EventHandler messageSentDelegate)Begins sending email asynchronously.
beginSend(IConnection connection, Iterable messages, System.EventHandler messageSentDelegate, System.AsyncCallback callback)Begins sending email asynchronously.
beginSend(IConnection connection, Iterable messages, System.EventHandler messageSentDelegate, System.AsyncCallback callback, Object state)Begins sending email asynchronously.
beginSend(IConnection connection, String from, String recipients, String subject, String body)Begins sending email asynchronously.
beginSend(IConnection connection, String from, String recipients, String subject, String body, System.AsyncCallback callback)Begins sending email asynchronously.
beginSend(IConnection connection, String from, String recipients, String subject, String body, System.AsyncCallback callback, Object state)Begins sending email asynchronously.
beginSend(MailMessage message)Begins sending email asynchronously.
beginSend(MailMessage message, System.AsyncCallback callback)Begins sending email asynchronously.
beginSend(MailMessage message, System.AsyncCallback callback, Object state)Begins sending email asynchronously.
beginSend(MailMessage[] messages)Begins sending email asynchronously.
beginSend(Iterable messages)Begins sending email asynchronously.
beginSend(Iterable messages, System.AsyncCallback callback)Begins sending email asynchronously.
beginSend(Iterable messages, System.AsyncCallback callback, Object state)Begins sending email asynchronously.
beginSend(Iterable messages, System.EventHandler messageSentDelegate)Begins sending email asynchronously.
beginSend(Iterable messages, System.EventHandler messageSentDelegate, System.AsyncCallback callback)Begins sending email asynchronously.
beginSend(Iterable messages, System.EventHandler messageSentDelegate, System.AsyncCallback callback, Object state)Begins sending email asynchronously.
beginSend(String from, String recipients, String subject, String body)Begins sending email asynchronously.
beginSend(String from, String recipients, String subject, String body, System.AsyncCallback callback)Begins sending email asynchronously.
beginSend(String from, String recipients, String subject, String body, System.AsyncCallback callback, Object state)Begins sending email asynchronously.
beginSendQueue()Begins to execute ‘No operation’ command
beginSendQueue(System.AsyncCallback callback)Begins to execute ‘No operation’ command
beginSendQueue(System.AsyncCallback callback, Object state)Begins to execute ‘No operation’ command
beginValidateCredentials()Begins to execute credentials validation
beginValidateCredentials(IConnection connection)Begins to execute credentials validation
beginValidateCredentials(IConnection connection, System.AsyncCallback callback)Begins to execute credentials validation
beginValidateCredentials(IConnection connection, System.AsyncCallback callback, Object state)Begins to execute credentials validation
beginValidateCredentials(System.AsyncCallback callback)Begins to execute credentials validation
beginValidateCredentials(System.AsyncCallback callback, Object state)Begins to execute credentials validation
bindIPEndPoint(BindIPEndPointHandler handler)Associates a Socket with a local endpoint.
cancelAsyncOperation(System.IAsyncResult asyncResult)Cancels asynchronous operation.
close()
connectIPEndPoint(BindIPEndPointHandler handler)Associates a Socket with a remote endpoint.
createConnection()Creates new independent connection for operations not linked to threads (not default connection).
createConnection(boolean createAsDefaultConnection)Creates new (default or independent) connection for operations.
dispose()Finalizes all operations with a server.
endBeginSendQueue(System.IAsyncResult asyncResult)Waits for the pending asynchronous operation to complete.
endForward(System.IAsyncResult asyncResult)Waits for the asynchronous operation to complete.
endNoop(System.IAsyncResult asyncResult)Waits for the pending asynchronous operation to complete.
endSend(System.IAsyncResult asyncResult)Waits for the asynchronous operation to complete.
endValidateCredentials(System.IAsyncResult asyncResult)Waits for the pending asynchronous operation to complete.
equals(Object arg0)
forward(IConnection connection, String sender, MailAddressCollection recipients, MailMessage message)Forwards specified message to recipient
forward(IConnection connection, String sender, MailAddressCollection recipients, InputStream messageStream)Forwards specified message to recipient
forward(IConnection connection, String sender, String recipient, MailMessage message)Forwards specified message to recipient
forward(String sender, MailAddressCollection recipients, MailMessage message)Forwards specified message to recipient
forward(String sender, MailAddressCollection recipients, InputStream messageStream)Forwards specified message to recipient
forward(String sender, String recipient, MailMessage message)Forwards specified message to recipient
getAccessToken()Gets or sets the access token.
getAllowedAuthentication()Gets or sets enumeration of allowed by user authentication types
getCapabilities()Get Capabilities.
getClass()
getClientCertificates()Contains collection of clients certificates
getConnectionAsgmtMode()Gets or sets value which defines mode of connection allocation in multiple threads environment There are folowing connection types: - Main connection is connection created and disposed together with mail client.It can’t be created or disposed manually.
getConnectionCheckupPeriod()Period of connection checking up in milliseconds.
getConnectionState()Gets the current state of the connection.
getConnectionsQuantity()Gets or sets quantity of connections in multy-connection mode
getCurrentConnection()Gets current connection according to ConnectionAsgmtMode option
getDefaultPort()Gets default port for client
getDeliveryMethod()Gets or sets the delivery method.
getEnableLogger()Gets or sets value which allows enable/disable logger
getGreetingTimeout()Gets or sets the greeting timeout that is used when establishing a connection.
getHelloMessage()Gets or sets a HELO/EHLO string.
getHost()Gets or sets the host name.
getLogFileName()Gets or sets log file name
getPassword()Gets or sets the password.
getPickupDirectoryLocation()Gets or sets the directory where applications save mail messages to be processed by the local SMTP server.
getPort()Gets or sets the port.
getProxy()Gets or sets proxy for the client
getSecurityOptions()Security mode for a mail client
getSmtpQueueLocation()Gets or sets the directory where applications save mail messages to be processed by sending in SMTP queue.
getSupportedAuthentication()Gets enumeration of supported by server authentication types
getSupportedEncryption()Defines the versions of SSL/TLS encryption protocols to be used.
getTimeout()Gets or sets the timeout for mail operations
getTokenProvider()Gets or sets TokenProvider allowing to retrieve access token.
getUseAuthentication()Indicates whether authentication is used.
getUseDateInLogFileName()Gets or sets value which indicates if date has to be used in log file name.
getUseDefaultCredentials()Gets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests.
getUseMultiConnection()Gets or sets value which indicates if client has to use multiple connections for heavy loaded operations.
getUsePipelining()Gets or sets object which indicates whether the pipelining mode is enabled.
getUseTnef()Gets or sets a boolean value that controls whether the messages are sent in TNEF format.
getUsername()Gets or sets the username.
hashCode()
noop()‘No operation’ command
noop(IConnection connection)‘No operation’ command
notify()
notifyAll()
resetLogSettings()Resets logging settings to default.
send(IConnection connection, MailMessage message)Send the specified message.
send(IConnection connection, MailMessage[] messages)Send the specified message.
send(IConnection connection, MailMessageCollection messages)Send the specified message collection.
send(IConnection connection, Iterable messages)Send the specified messages.
send(IConnection connection, String from, String recipients, String subject, String body)Creates and sends the specified message.
send(MailMessage message)Send the specified message.
send(MailMessage[] messages)Send the specified message.
send(MailMessageCollection messages)Send the specified message collection.
send(Iterable messages)Send the specified messages.
send(String from, String recipients, String subject, String body)Creates and sends the specified message.
sendToQueue(Iterable messages)Append messages to queue
setAccessToken(String value)Gets or sets the access token.
setAllowedAuthentication(long value)Gets or sets enumeration of allowed by user authentication types
setConnectionAsgmtMode(int value)Gets or sets value which defines mode of connection allocation in multiple threads environment There are folowing connection types: - Main connection is connection created and disposed together with mail client.It can’t be created or disposed manually.
setConnectionCheckupPeriod(int value)Period of connection checking up in milliseconds.
setConnectionsQuantity(int value)Gets or sets quantity of connections in multy-connection mode
setDeliveryMethod(int value)Gets or sets the delivery method.
setEnableLogger(boolean value)Gets or sets value which allows enable/disable logger
setFailedSending(System.EventHandler handler)Adds or removes subscriber for notifications about failed sending operations in smtp queue
setGreetingTimeout(int value)Gets or sets the greeting timeout that is used when establishing a connection.
setHelloMessage(String value)Gets or sets a HELO/EHLO string.
setHost(String value)Gets or sets the host name.
setLogFileName(String value)Gets or sets log file name
setPassword(String value)Gets or sets the password.
setPickupDirectoryLocation(String value)Gets or sets the directory where applications save mail messages to be processed by the local SMTP server.
setPort(int value)Gets or sets the port.
setProxy(Proxy value)Gets or sets proxy for the client
setSecurityOptions(int value)Security mode for a mail client
setShowCredentialsInLog(boolean value)Sets value indicating whether Credentials should be displayed in the log.
setSmtpQueueLocation(String value)Gets or sets the directory where applications save mail messages to be processed by sending in SMTP queue.
setSocketsLayerVersion2(boolean value)Sets value indicating whether Sockets Layer version 2 is used.
setSocketsLayerVersion2DisableSSLCertificateValidation(boolean value)Disable SSL certificate validation for Sockets Layer version 2
setSocketsLayerVersion2SSLSocketFactory(SSLSocketFactory value)Set SSL Socket Factory for Sockets Layer version 2
setSucceededSending(System.EventHandler handler)Adds or removes subscriber for notifications about succeeded sending of mail messages.
setSupportedEncryption(int value)Defines the versions of SSL/TLS encryption protocols to be used.
setSupportedEncryptionUnsafe(int value)Defines the versions of SSL/TLS encryption protocols to be used.
setTimeout(int value)Gets or sets the timeout for mail operations
setTokenProvider(ITokenProvider value)Gets or sets TokenProvider allowing to retrieve access token.
setUseAuthentication(boolean value)Indicates whether authentication is used.
setUseDateInLogFileName(boolean value)Gets or sets value which indicates if date has to be used in log file name.
setUseDefaultCredentials(boolean value)Gets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests.
setUseMultiConnection(int value)Gets or sets value which indicates if client has to use multiple connections for heavy loaded operations.
setUsePipelining(PipeliningStatus value)Gets or sets object which indicates whether the pipelining mode is enabled.
setUseTnef(boolean value)Gets or sets a boolean value that controls whether the messages are sent in TNEF format.
setUsername(String value)Gets or sets the username.
toString()
usePasswordQuotes(boolean value)Sets a value indicating whether Quotes should be used in login password syntax with special characters.
validateCredentials()Executes credentials validation
validateCredentials(IConnection connection)Executes credentials validation
wait()
wait(long arg0)
wait(long arg0, int arg1)

SmtpClient()

public SmtpClient()

Initializes a new instance of the SmtpClient class.

SmtpClient(String host)

public SmtpClient(String host)

Initializes a new instance of the SmtpClient class.

Parameters:

ParameterTypeDescription
hostjava.lang.StringThe name of the host used for SMTP.

SmtpClient(String host, short securityOptions)

public SmtpClient(String host, short securityOptions)

Initializes a new instance of the SmtpClient class.

Parameters:

ParameterTypeDescription
hostjava.lang.StringThe name of the host used for SMTP.
securityOptionsshortSecurity mode for a mail client

SmtpClient(String host, int port)

public SmtpClient(String host, int port)

Initializes a new instance of the SmtpClient class.

Parameters:

ParameterTypeDescription
hostjava.lang.StringThe name of the host used for SMTP.
portintThe port used for SMTP.

SmtpClient(String host, int port, int securityOptions)

public SmtpClient(String host, int port, int securityOptions)

Initializes a new instance of the SmtpClient class.

Parameters:

ParameterTypeDescription
hostjava.lang.StringThe name of the host used for SMTP.
portintThe port used for SMTP.
securityOptionsintSecurity mode for a mail client

SmtpClient(String host, String username, String password)

public SmtpClient(String host, String username, String password)

Initializes a new instance of the SmtpClient class.

Parameters:

ParameterTypeDescription
hostjava.lang.StringThe name of the host used for SMTP.
usernamejava.lang.StringThe username.
passwordjava.lang.StringThe password.

SmtpClient(String host, String username, String password, int securityOptions)

public SmtpClient(String host, String username, String password, int securityOptions)

Initializes a new instance of the SmtpClient class.

Parameters:

ParameterTypeDescription
hostjava.lang.StringThe name of the host used for SMTP.
usernamejava.lang.StringThe username.
passwordjava.lang.StringThe password.
securityOptionsintSecurity mode for a mail client

SmtpClient(String host, int port, String username, String password)

public SmtpClient(String host, int port, String username, String password)

Initializes a new instance of the SmtpClient class.

Parameters:

ParameterTypeDescription
hostjava.lang.StringThe name of the host used for SMTP.
portintThe port used for SMTP.
usernamejava.lang.StringThe username.
passwordjava.lang.StringThe password.

SmtpClient(String host, int port, String username, String password, int securityOptions)

public SmtpClient(String host, int port, String username, String password, int securityOptions)

Initializes a new instance of the SmtpClient class.

Parameters:

ParameterTypeDescription
hostjava.lang.StringThe name of the host used for SMTP.
portintThe port used for SMTP.
usernamejava.lang.StringThe username.
passwordjava.lang.StringThe password.
securityOptionsintSecurity mode for a mail client

SmtpClient(String host, String username, String authInfo, boolean useOAuth)

public SmtpClient(String host, String username, String authInfo, boolean useOAuth)

Initializes a new instance of the SmtpClient class.

Parameters:

ParameterTypeDescription
hostjava.lang.StringThe name of the host used for SMTP.
usernamejava.lang.StringThe username.
authInfojava.lang.StringThe user password or XOAUTH2 access token
useOAuthbooleanDefines whether SASL XOAUTH2 mechanism is used to login to the server

SmtpClient(String host, String username, String authInfo, boolean useOAuth, int securityOptions)

public SmtpClient(String host, String username, String authInfo, boolean useOAuth, int securityOptions)

Initializes a new instance of the SmtpClient class.

Parameters:

ParameterTypeDescription
hostjava.lang.StringThe name of the host used for SMTP.
usernamejava.lang.StringThe username.
authInfojava.lang.StringThe user password or XOAUTH2 access token
useOAuthbooleanDefines whether SASL XOAUTH2 mechanism is used to login to the server
securityOptionsintSecurity mode for a mail client

SmtpClient(String host, int port, String username, String authInfo, boolean useOAuth)

public SmtpClient(String host, int port, String username, String authInfo, boolean useOAuth)

Initializes a new instance of the SmtpClient class.

Parameters:

ParameterTypeDescription
hostjava.lang.StringThe name of the host used for SMTP.
portintThe port used for SMTP.
usernamejava.lang.StringThe username.
authInfojava.lang.StringThe user password or XOAUTH2 access token
useOAuthbooleanDefines whether SASL XOAUTH2 mechanism is used to login to the server

SmtpClient(String host, int port, String username, String authInfo, boolean useOAuth, int securityOptions)

public SmtpClient(String host, int port, String username, String authInfo, boolean useOAuth, int securityOptions)

Initializes a new instance of the SmtpClient class.

Parameters:

ParameterTypeDescription
hostjava.lang.StringThe name of the host used for SMTP.
portintThe port used for SMTP.
usernamejava.lang.StringThe username.
authInfojava.lang.StringThe user password or XOAUTH2 access token
useOAuthbooleanDefines whether SASL XOAUTH2 mechanism is used to login to the server
securityOptionsintSecurity mode for a mail client

SmtpClient(String host, String username, ITokenProvider tokenProvider)

public SmtpClient(String host, String username, ITokenProvider tokenProvider)

Initializes a new instance of the SmtpClient class.

Parameters:

ParameterTypeDescription
hostjava.lang.StringThe name of the host used for SMTP.
usernamejava.lang.StringThe username.
tokenProviderITokenProviderTokenProvider allowing to retrieve access token.

SmtpClient(String host, String username, ITokenProvider tokenProvider, int securityOptions)

public SmtpClient(String host, String username, ITokenProvider tokenProvider, int securityOptions)

Initializes a new instance of the SmtpClient class.

Parameters:

ParameterTypeDescription
hostjava.lang.StringThe name of the host used for SMTP.
usernamejava.lang.StringThe username.
tokenProviderITokenProviderTokenProvider allowing to retrieve access token.
securityOptionsintSecurity mode for a mail client

SmtpClient(String host, int port, String username, ITokenProvider tokenProvider)

public SmtpClient(String host, int port, String username, ITokenProvider tokenProvider)

Initializes a new instance of the SmtpClient class.

Parameters:

ParameterTypeDescription
hostjava.lang.StringThe name of the host used for SMTP.
portintThe port used for SMTP.
usernamejava.lang.StringThe username.
tokenProviderITokenProviderTokenProvider allowing to retrieve access token.

SmtpClient(String host, int port, String username, ITokenProvider tokenProvider, int securityOptions)

public SmtpClient(String host, int port, String username, ITokenProvider tokenProvider, int securityOptions)

Initializes a new instance of the SmtpClient class.

Parameters:

ParameterTypeDescription
hostjava.lang.StringThe name of the host used for SMTP.
portintThe port used for SMTP.
usernamejava.lang.StringThe username.
tokenProviderITokenProviderTokenProvider allowing to retrieve access token.
securityOptionsintSecurity mode for a mail client

beginForward(IConnection connection, String sender, MailAddressCollection recipients, MailMessage message)

public final System.IAsyncResult beginForward(IConnection connection, String sender, MailAddressCollection recipients, MailMessage message)

Begins forward email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
senderjava.lang.StringSender of the forwarded message.
recipientsMailAddressCollectionRecipients of the forwarded message.
messageMailMessageThe message for a forwarding.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginForward(IConnection connection, String sender, MailAddressCollection recipients, MailMessage message, System.AsyncCallback callback)

public final System.IAsyncResult beginForward(IConnection connection, String sender, MailAddressCollection recipients, MailMessage message, System.AsyncCallback callback)

Begins forward email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
senderjava.lang.StringSender of the forwarded message.
recipientsMailAddressCollectionRecipients of the forwarded message.
messageMailMessageThe message for a forwarding.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginForward(IConnection connection, String sender, MailAddressCollection recipients, MailMessage message, System.AsyncCallback callback, Object state)

public final System.IAsyncResult beginForward(IConnection connection, String sender, MailAddressCollection recipients, MailMessage message, System.AsyncCallback callback, Object state)

Begins forward email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
senderjava.lang.StringSender of the forwarded message.
recipientsMailAddressCollectionRecipients of the forwarded message.
messageMailMessageThe message for a forwarding.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.
statejava.lang.ObjectThe state.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginForward(IConnection connection, String sender, String recipient, MailMessage message)

public final System.IAsyncResult beginForward(IConnection connection, String sender, String recipient, MailMessage message)

Begins forward email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
senderjava.lang.StringSender of the forwarded message.
recipientjava.lang.StringRecipient of the forwarded message.
messageMailMessageThe message for a forwarding.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginForward(IConnection connection, String sender, String recipient, MailMessage message, System.AsyncCallback callback)

public final System.IAsyncResult beginForward(IConnection connection, String sender, String recipient, MailMessage message, System.AsyncCallback callback)

Begins forward email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
senderjava.lang.StringSender of the forwarded message.
recipientjava.lang.StringRecipients of the forwarded message.
messageMailMessageThe message for a forwarding.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginForward(IConnection connection, String sender, String recipient, MailMessage message, System.AsyncCallback callback, Object state)

public final System.IAsyncResult beginForward(IConnection connection, String sender, String recipient, MailMessage message, System.AsyncCallback callback, Object state)

Begins forward email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
senderjava.lang.StringSender of the forwarded message.
recipientjava.lang.StringRecipients of the forwarded message.
messageMailMessageThe message for a forwarding.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.
statejava.lang.ObjectThe state.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginForward(String sender, MailAddressCollection recipients, MailMessage message)

public final System.IAsyncResult beginForward(String sender, MailAddressCollection recipients, MailMessage message)

Begins forward email asynchronously.

Parameters:

ParameterTypeDescription
senderjava.lang.StringSender of the forwarded message.
recipientsMailAddressCollectionRecipients of the forwarded message.
messageMailMessageThe message for a forwarding.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginForward(String sender, MailAddressCollection recipients, MailMessage message, System.AsyncCallback callback)

public final System.IAsyncResult beginForward(String sender, MailAddressCollection recipients, MailMessage message, System.AsyncCallback callback)

Begins forward email asynchronously.

Parameters:

ParameterTypeDescription
senderjava.lang.StringSender of the forwarded message.
recipientsMailAddressCollectionRecipients of the forwarded message.
messageMailMessageThe message for a forwarding.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginForward(String sender, MailAddressCollection recipients, MailMessage message, System.AsyncCallback callback, Object state)

public final System.IAsyncResult beginForward(String sender, MailAddressCollection recipients, MailMessage message, System.AsyncCallback callback, Object state)

Begins forward email asynchronously.

Parameters:

ParameterTypeDescription
senderjava.lang.StringSender of the forwarded message.
recipientsMailAddressCollectionRecipients of the forwarded message.
messageMailMessageThe message for a forwarding.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.
statejava.lang.ObjectThe state.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginForward(String sender, String recipient, MailMessage message)

public final System.IAsyncResult beginForward(String sender, String recipient, MailMessage message)

Begins forward email asynchronously.

Parameters:

ParameterTypeDescription
senderjava.lang.StringSender of the forwarded message.
recipientjava.lang.StringRecipients of the forwarded message.
messageMailMessageThe message for a forwarding.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginForward(String sender, String recipient, MailMessage message, System.AsyncCallback callback)

public final System.IAsyncResult beginForward(String sender, String recipient, MailMessage message, System.AsyncCallback callback)

Begins forward email asynchronously.

Parameters:

ParameterTypeDescription
senderjava.lang.StringSender of the forwarded message.
recipientjava.lang.StringRecipients of the forwarded message.
messageMailMessageThe message for a forwarding.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginForward(String sender, String recipient, MailMessage message, System.AsyncCallback callback, Object state)

public final System.IAsyncResult beginForward(String sender, String recipient, MailMessage message, System.AsyncCallback callback, Object state)

Begins forward email asynchronously.

Parameters:

ParameterTypeDescription
senderjava.lang.StringSender of the forwarded message.
recipientjava.lang.StringRecipients of the forwarded message.
messageMailMessageThe message for a forwarding.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.
statejava.lang.ObjectThe state.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginNoop()

public final System.IAsyncResult beginNoop()

Begins to execute ‘No operation’ command

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginNoop(IConnection connection)

public final System.IAsyncResult beginNoop(IConnection connection)

Begins to execute ‘No operation’ command

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginNoop(IConnection connection, System.AsyncCallback callback)

public final System.IAsyncResult beginNoop(IConnection connection, System.AsyncCallback callback)

Begins to execute ‘No operation’ command

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginNoop(IConnection connection, System.AsyncCallback callback, Object state)

public final System.IAsyncResult beginNoop(IConnection connection, System.AsyncCallback callback, Object state)

Begins to execute ‘No operation’ command

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.
statejava.lang.ObjectThe state.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginNoop(System.AsyncCallback callback)

public final System.IAsyncResult beginNoop(System.AsyncCallback callback)

Begins to execute ‘No operation’ command

Parameters:

ParameterTypeDescription
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginNoop(System.AsyncCallback callback, Object state)

public final System.IAsyncResult beginNoop(System.AsyncCallback callback, Object state)

Begins to execute ‘No operation’ command

Parameters:

ParameterTypeDescription
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.
statejava.lang.ObjectThe state.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(IConnection connection, MailMessage message)

public final System.IAsyncResult beginSend(IConnection connection, MailMessage message)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
messageMailMessageRepresents an e-mail message

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(IConnection connection, MailMessage message, System.AsyncCallback callback)

public final System.IAsyncResult beginSend(IConnection connection, MailMessage message, System.AsyncCallback callback)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
messageMailMessageRepresents an e-mail message
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(IConnection connection, MailMessage message, System.AsyncCallback callback, Object state)

public final System.IAsyncResult beginSend(IConnection connection, MailMessage message, System.AsyncCallback callback, Object state)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
messageMailMessageRepresents an e-mail message
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.
statejava.lang.ObjectThe state.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(IConnection connection, MailMessage[] messages)

public final System.IAsyncResult beginSend(IConnection connection, MailMessage[] messages)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
messagesMailMessage[]The array of MailMessage that represents an email-messages to send.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(IConnection connection, Iterable messages)

public final System.IAsyncResult beginSend(IConnection connection, Iterable<MailMessage> messages)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
messagesjava.lang.Iterable<com.aspose.email.MailMessage>The array of MailMessage that represents an email-messages to send.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(IConnection connection, Iterable messages, System.AsyncCallback callback)

public final System.IAsyncResult beginSend(IConnection connection, Iterable<MailMessage> messages, System.AsyncCallback callback)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
messagesjava.lang.Iterable<com.aspose.email.MailMessage>The array of MailMessage that represents an email-messages to send.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(IConnection connection, Iterable messages, System.AsyncCallback callback, Object state)

public final System.IAsyncResult beginSend(IConnection connection, Iterable<MailMessage> messages, System.AsyncCallback callback, Object state)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
messagesjava.lang.Iterable<com.aspose.email.MailMessage>The array of MailMessage that represents an email-messages to send.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.
statejava.lang.ObjectThe state.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(IConnection connection, Iterable messages, System.EventHandler messageSentDelegate)

public final System.IAsyncResult beginSend(IConnection connection, Iterable<MailMessage> messages, System.EventHandler<MailMessageEventArgs> messageSentDelegate)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
messagesjava.lang.Iterable<com.aspose.email.MailMessage>The array of MailMessage that represents an email-messages to send.
messageSentDelegatecom.aspose.ms.System.EventHandler<com.aspose.email.MailMessageEventArgs>References a method to be called when a message has been sent.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(IConnection connection, Iterable messages, System.EventHandler messageSentDelegate, System.AsyncCallback callback)

public final System.IAsyncResult beginSend(IConnection connection, Iterable<MailMessage> messages, System.EventHandler<MailMessageEventArgs> messageSentDelegate, System.AsyncCallback callback)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
messagesjava.lang.Iterable<com.aspose.email.MailMessage>The array of MailMessage that represents an email-messages to send.
messageSentDelegatecom.aspose.ms.System.EventHandler<com.aspose.email.MailMessageEventArgs>References a method to be called when a message has been sent.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(IConnection connection, Iterable messages, System.EventHandler messageSentDelegate, System.AsyncCallback callback, Object state)

public final System.IAsyncResult beginSend(IConnection connection, Iterable<MailMessage> messages, System.EventHandler<MailMessageEventArgs> messageSentDelegate, System.AsyncCallback callback, Object state)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
messagesjava.lang.Iterable<com.aspose.email.MailMessage>The array of MailMessage that represents an email-messages to send.
messageSentDelegatecom.aspose.ms.System.EventHandler<com.aspose.email.MailMessageEventArgs>References a method to be called when a message has been sent.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.
statejava.lang.ObjectThe state.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(IConnection connection, String from, String recipients, String subject, String body)

public final System.IAsyncResult beginSend(IConnection connection, String from, String recipients, String subject, String body)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
fromjava.lang.StringA String that contains the address of message sender.
recipientsjava.lang.StringA String that contains the address of recipients.
subjectjava.lang.StringA subject of message.
bodyjava.lang.StringA body of message.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(IConnection connection, String from, String recipients, String subject, String body, System.AsyncCallback callback)

public final System.IAsyncResult beginSend(IConnection connection, String from, String recipients, String subject, String body, System.AsyncCallback callback)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
fromjava.lang.StringA String that contains the address of message sender.
recipientsjava.lang.StringA String that contains the address of recipients.
subjectjava.lang.StringA subject of message.
bodyjava.lang.StringA body of message.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(IConnection connection, String from, String recipients, String subject, String body, System.AsyncCallback callback, Object state)

public final System.IAsyncResult beginSend(IConnection connection, String from, String recipients, String subject, String body, System.AsyncCallback callback, Object state)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
fromjava.lang.StringA String that contains the address of message sender.
recipientsjava.lang.StringA String that contains the address of recipients.
subjectjava.lang.StringA subject of message.
bodyjava.lang.StringA body of message.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.
statejava.lang.ObjectThe state.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(MailMessage message)

public final System.IAsyncResult beginSend(MailMessage message)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
messageMailMessageRepresents an e-mail message

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(MailMessage message, System.AsyncCallback callback)

public final System.IAsyncResult beginSend(MailMessage message, System.AsyncCallback callback)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
messageMailMessageRepresents an e-mail message
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(MailMessage message, System.AsyncCallback callback, Object state)

public final System.IAsyncResult beginSend(MailMessage message, System.AsyncCallback callback, Object state)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
messageMailMessageRepresents an e-mail message
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.
statejava.lang.ObjectThe state.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(MailMessage[] messages)

public final System.IAsyncResult beginSend(MailMessage[] messages)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
messagesMailMessage[]The array of MailMessage that represents an email-messages to send.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(Iterable messages)

public final System.IAsyncResult beginSend(Iterable<MailMessage> messages)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
messagesjava.lang.Iterable<com.aspose.email.MailMessage>The array of MailMessage that represents an email-messages to send.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(Iterable messages, System.AsyncCallback callback)

public final System.IAsyncResult beginSend(Iterable<MailMessage> messages, System.AsyncCallback callback)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
messagesjava.lang.Iterable<com.aspose.email.MailMessage>The array of MailMessage that represents an email-messages to send.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(Iterable messages, System.AsyncCallback callback, Object state)

public final System.IAsyncResult beginSend(Iterable<MailMessage> messages, System.AsyncCallback callback, Object state)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
messagesjava.lang.Iterable<com.aspose.email.MailMessage>The array of MailMessage that represents an email-messages to send.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.
statejava.lang.ObjectThe state.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(Iterable messages, System.EventHandler messageSentDelegate)

public final System.IAsyncResult beginSend(Iterable<MailMessage> messages, System.EventHandler<MailMessageEventArgs> messageSentDelegate)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
messagesjava.lang.Iterable<com.aspose.email.MailMessage>The array of MailMessage that represents an email-messages to send.
messageSentDelegatecom.aspose.ms.System.EventHandler<com.aspose.email.MailMessageEventArgs>References a method to be called when a message has been sent.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(Iterable messages, System.EventHandler messageSentDelegate, System.AsyncCallback callback)

public final System.IAsyncResult beginSend(Iterable<MailMessage> messages, System.EventHandler<MailMessageEventArgs> messageSentDelegate, System.AsyncCallback callback)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
messagesjava.lang.Iterable<com.aspose.email.MailMessage>The array of MailMessage that represents an email-messages to send.
messageSentDelegatecom.aspose.ms.System.EventHandler<com.aspose.email.MailMessageEventArgs>References a method to be called when a message has been sent.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(Iterable messages, System.EventHandler messageSentDelegate, System.AsyncCallback callback, Object state)

public final System.IAsyncResult beginSend(Iterable<MailMessage> messages, System.EventHandler<MailMessageEventArgs> messageSentDelegate, System.AsyncCallback callback, Object state)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
messagesjava.lang.Iterable<com.aspose.email.MailMessage>The array of MailMessage that represents an email-messages to send.
messageSentDelegatecom.aspose.ms.System.EventHandler<com.aspose.email.MailMessageEventArgs>References a method to be called when a message has been sent.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.
statejava.lang.ObjectThe state.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(String from, String recipients, String subject, String body)

public final System.IAsyncResult beginSend(String from, String recipients, String subject, String body)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
fromjava.lang.StringA String that contains the address of message sender.
recipientsjava.lang.StringA String that contains the address of recipients.
subjectjava.lang.StringA subject of message.
bodyjava.lang.StringA body of message.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(String from, String recipients, String subject, String body, System.AsyncCallback callback)

public final System.IAsyncResult beginSend(String from, String recipients, String subject, String body, System.AsyncCallback callback)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
fromjava.lang.StringA String that contains the address of message sender.
recipientsjava.lang.StringA String that contains the address of recipients.
subjectjava.lang.StringA subject of message.
bodyjava.lang.StringA body of message.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSend(String from, String recipients, String subject, String body, System.AsyncCallback callback, Object state)

public final System.IAsyncResult beginSend(String from, String recipients, String subject, String body, System.AsyncCallback callback, Object state)

Begins sending email asynchronously.

Parameters:

ParameterTypeDescription
fromjava.lang.StringA String that contains the address of message sender.
recipientsjava.lang.StringA String that contains the address of recipients.
subjectjava.lang.StringA subject of message.
bodyjava.lang.StringA body of message.
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.
statejava.lang.ObjectThe state.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSendQueue()

public final System.IAsyncResult beginSendQueue()

Begins to execute ‘No operation’ command

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSendQueue(System.AsyncCallback callback)

public final System.IAsyncResult beginSendQueue(System.AsyncCallback callback)

Begins to execute ‘No operation’ command

Parameters:

ParameterTypeDescription
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginSendQueue(System.AsyncCallback callback, Object state)

public final System.IAsyncResult beginSendQueue(System.AsyncCallback callback, Object state)

Begins to execute ‘No operation’ command

Parameters:

ParameterTypeDescription
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.
statejava.lang.ObjectThe state.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginValidateCredentials()

public final System.IAsyncResult beginValidateCredentials()

Begins to execute credentials validation

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginValidateCredentials(IConnection connection)

public final System.IAsyncResult beginValidateCredentials(IConnection connection)

Begins to execute credentials validation

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginValidateCredentials(IConnection connection, System.AsyncCallback callback)

public final System.IAsyncResult beginValidateCredentials(IConnection connection, System.AsyncCallback callback)

Begins to execute credentials validation

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginValidateCredentials(IConnection connection, System.AsyncCallback callback, Object state)

public final System.IAsyncResult beginValidateCredentials(IConnection connection, System.AsyncCallback callback, Object state)

Begins to execute credentials validation

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.
statejava.lang.ObjectThe state.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginValidateCredentials(System.AsyncCallback callback)

public final System.IAsyncResult beginValidateCredentials(System.AsyncCallback callback)

Begins to execute credentials validation

Parameters:

ParameterTypeDescription
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

beginValidateCredentials(System.AsyncCallback callback, Object state)

public final System.IAsyncResult beginValidateCredentials(System.AsyncCallback callback, Object state)

Begins to execute credentials validation

Parameters:

ParameterTypeDescription
callbackcom.aspose.ms.System.AsyncCallbackReferences a method to be called when a corresponding asynchronous operation completes.
statejava.lang.ObjectThe state.

Returns: com.aspose.ms.System.IAsyncResult - IAsyncResult that represents the status of an asynchronous operation.

bindIPEndPoint(BindIPEndPointHandler handler)

public void bindIPEndPoint(BindIPEndPointHandler handler)

Associates a Socket with a local endpoint.

Parameters:

ParameterTypeDescription
handlerBindIPEndPointHandler

cancelAsyncOperation(System.IAsyncResult asyncResult)

public final void cancelAsyncOperation(System.IAsyncResult asyncResult)

Cancels asynchronous operation.

Parameters:

ParameterTypeDescription
asyncResultcom.aspose.ms.System.IAsyncResultDefines asynchronous operation to cancel.

close()

public void close()

connectIPEndPoint(BindIPEndPointHandler handler)

public void connectIPEndPoint(BindIPEndPointHandler handler)

Associates a Socket with a remote endpoint.

Parameters:

ParameterTypeDescription
handlerBindIPEndPointHandler

createConnection()

public IConnection createConnection()

Creates new independent connection for operations not linked to threads (not default connection). Invocation of this method is similar to invocation of CreateConnection(createAsDefaultConnection = false) Please see more in documentation for EmailClient.ConnectionAsgmtMode property.

Returns: IConnection - Returns connection object

createConnection(boolean createAsDefaultConnection)

public IConnection createConnection(boolean createAsDefaultConnection)

Creates new (default or independent) connection for operations. Please see more in documentation for EmailClient.ConnectionAsgmtMode property.

Parameters:

ParameterTypeDescription
createAsDefaultConnectionbooleanIndicates if connection has to be created as default for current thread

Returns: IConnection - Returns connection object

dispose()

public void dispose()

Finalizes all operations with a server.

endBeginSendQueue(System.IAsyncResult asyncResult)

public final void endBeginSendQueue(System.IAsyncResult asyncResult)

Waits for the pending asynchronous operation to complete.

Parameters:

ParameterTypeDescription
asyncResultcom.aspose.ms.System.IAsyncResultThe reference to the pending asynchronous request to wait for.

endForward(System.IAsyncResult asyncResult)

public final void endForward(System.IAsyncResult asyncResult)

Waits for the asynchronous operation to complete.

Parameters:

ParameterTypeDescription
asyncResultcom.aspose.ms.System.IAsyncResultThe reference to the pending asynchronous request to wait for.

endNoop(System.IAsyncResult asyncResult)

public final void endNoop(System.IAsyncResult asyncResult)

Waits for the pending asynchronous operation to complete.

Parameters:

ParameterTypeDescription
asyncResultcom.aspose.ms.System.IAsyncResultThe reference to the pending asynchronous request to wait for.

endSend(System.IAsyncResult asyncResult)

public final void endSend(System.IAsyncResult asyncResult)

Waits for the asynchronous operation to complete.

Parameters:

ParameterTypeDescription
asyncResultcom.aspose.ms.System.IAsyncResultThe reference to the pending asynchronous request to wait for.

endValidateCredentials(System.IAsyncResult asyncResult)

public final boolean endValidateCredentials(System.IAsyncResult asyncResult)

Waits for the pending asynchronous operation to complete.

Parameters:

ParameterTypeDescription
asyncResultcom.aspose.ms.System.IAsyncResultThe reference to the pending asynchronous request to wait for.

Returns: boolean - True if authentication was successful, otherwise false.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

forward(IConnection connection, String sender, MailAddressCollection recipients, MailMessage message)

public final void forward(IConnection connection, String sender, MailAddressCollection recipients, MailMessage message)

Forwards specified message to recipient

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
senderjava.lang.StringSender of the forwarded message.
recipientsMailAddressCollectionRecipients of the forwarded message.
messageMailMessageThe message for a forwarding.

forward(IConnection connection, String sender, MailAddressCollection recipients, InputStream messageStream)

public final void forward(IConnection connection, String sender, MailAddressCollection recipients, InputStream messageStream)

Forwards specified message to recipient

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
senderjava.lang.StringSender of the forwarded message.
recipientsMailAddressCollectionRecipients of the forwarded message.
messageStreamjava.io.InputStreamThe stream that represents message in eml format.

forward(IConnection connection, String sender, String recipient, MailMessage message)

public final void forward(IConnection connection, String sender, String recipient, MailMessage message)

Forwards specified message to recipient

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
senderjava.lang.StringSender of the forwarded message.
recipientjava.lang.StringRecipient of the forwarded message.
messageMailMessageThe message for a forwarding.

forward(String sender, MailAddressCollection recipients, MailMessage message)

public final void forward(String sender, MailAddressCollection recipients, MailMessage message)

Forwards specified message to recipient

Parameters:

ParameterTypeDescription
senderjava.lang.StringSender of the forwarded message.
recipientsMailAddressCollectionRecipients of the forwarded message.
messageMailMessageThe message for a forwarding.

forward(String sender, MailAddressCollection recipients, InputStream messageStream)

public final void forward(String sender, MailAddressCollection recipients, InputStream messageStream)

Forwards specified message to recipient

Parameters:

ParameterTypeDescription
senderjava.lang.StringSender of the forwarded message.
recipientsMailAddressCollectionRecipients of the forwarded message.
messageStreamjava.io.InputStreamThe stream that represents message in eml format.

forward(String sender, String recipient, MailMessage message)

public final void forward(String sender, String recipient, MailMessage message)

Forwards specified message to recipient

Parameters:

ParameterTypeDescription
senderjava.lang.StringSender of the forwarded message.
recipientjava.lang.StringRecipient of the forwarded message.
messageMailMessageThe message for a forwarding.

getAccessToken()

public String getAccessToken()

Gets or sets the access token.

Value: The string that represents access token.

Returns: java.lang.String

getAllowedAuthentication()

public final long getAllowedAuthentication()

Gets or sets enumeration of allowed by user authentication types

Returns: long

getCapabilities()

public String[] getCapabilities()

Get Capabilities.

Returns: java.lang.String[]

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getClientCertificates()

public System.Security.Cryptography.X509Certificates.X509CertificateCollection getClientCertificates()

Contains collection of clients certificates

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

getConnectionAsgmtMode()

public int getConnectionAsgmtMode()

Gets or sets value which defines mode of connection allocation in multiple threads environment There are folowing connection types: - Main connection is connection created and disposed together with mail client.It can’t be created or disposed manually. - Default connection is connection default for some thread. If default connection exists and ConnectionAsgmtMode allow, all methods of email client executed in this thread will be implicitly use this connection. Only one default connection can be exist per thread. It can be created manually or automatically. It depends on EmailClient.ConnectionAsgmtMode property. These connections can be created manually with EmailClient.CreateConnection(createAsDefaultConnection = true) method. If default connection does not used(depends on connection allocation mode), main connection used implicitly instead of it. - Independent connections are connections that are not linked to threads.They can be created manually and has to be used explicitly as method parameter. These connections can be created manually with EmailClient.CreateConnection() method or EmailClient.CreateConnection(createAsDefaultConnection = false) method. There are folowing connection allocation types: - ConnectionAsgmtType.UseMainOrDefault This mode uses by default in email clients. Email client uses main connection for all operations from multiple threads if default connection hasn’t been created, or connection hasnt been passed as method parameter explicitly. Main connection is connection which is created in the same time like email client. User can create default connections for threads with CreateConnection method. If default connection for thread is created, it’s used implicitly for all methods of email client which are invoked in this thread. If default connection for thread is not created, main connection is used for all methods of email client which are invoked in this thread. User also can create connections not linked with threads (not default connections) with CreateConnection method. If user wants to use other connections (not main and not default) he has to pass this connection explicitly as parameter of a method which he wants to use. User can additionally create any number of connections. Default connection can be only one per thread. Please note default connections works correctly if user uses Thread objects for multitasking programming. If user uses ConnectionPool or uses Task objects for multitasking programming this mode may lead to wrong behaviour of a programm. To avoid this problem user has to manually dispose default conection (if he uses it) in the end of the code which executes in the thread. - ConnectionAsgmtType.UseMain Email client uses main connection for all operations from multiple threads. Main connection is connection which is created in the same time like email client. User cann’t create default connections. User can create connections not linked with threads (not default connections) with CreateConnection method. If user wants to use other connections (not main and not default) he has to pass this connection explicitly as parameter of a method which he wants to use. User can additionally create any number of connections. - ConnectionAsgmtType.UseDefault Email client uses implicitly only default connections for all operations from multiple threads. Main connection is not used in this mode. If default connection hasn’t been created for some thread (first invocation of email client method), email client creates default connection implicitly for thread before first operation is executed. User can’t create default connections for threads with CreateConnection method because they are created automatically. When default connection for thread is created, it’s used implicitly for all methods of email client which are invoked in this thread.read. User also can create connections not linked with threads (not default connections) with CreateConnection method. If user wants to use other connections (not main and not default) he has to pass this connection explicitly as parameter of a method which he wants to use. User can additionally create any number of connections. Default connection can be only one per thread. Please note default connections works correctly if user uses Thread objects for multitasking programming. If user uses ConnectionPool or uses Task objects for multitasking programming this mode may lead to wrong behaviour of a programm. To avoid this problem user has to manually dispose default conection in the end of the code which executes in the thread.

Returns: int

getConnectionCheckupPeriod()

public int getConnectionCheckupPeriod()

Period of connection checking up in milliseconds. Default value is 5 min.

Returns: int

getConnectionState()

public final int getConnectionState()

Gets the current state of the connection.

Returns: int

getConnectionsQuantity()

public int getConnectionsQuantity()

Gets or sets quantity of connections in multy-connection mode

Returns: int

getCurrentConnection()

public IConnection getCurrentConnection()

Gets current connection according to ConnectionAsgmtMode option

Returns: IConnection

getDefaultPort()

public int getDefaultPort()

Gets default port for client

Returns: int

getDeliveryMethod()

public final int getDeliveryMethod()

Gets or sets the delivery method.

Value: An SmtpDeliveryMethod that indicates how messages are delivered.

Returns: int

getEnableLogger()

public final boolean getEnableLogger()

Gets or sets value which allows enable/disable logger

Returns: boolean

getGreetingTimeout()

public final int getGreetingTimeout()

Gets or sets the greeting timeout that is used when establishing a connection. Please note, greeting timeout can’t be infinite. Email clients may execute enough long operations. To limit the time of operations users have to use EmailClient.Timeout (#getTimeout.getTimeout/#setTimeout(int).setTimeout(int)) property. Values for this property have to have long intervals to not prevent long-time operations. But in some cases, if EmailClient will use only Timeout property connection establishing may take a long time. For instance, the mail client may use the automatic mode to connection establishing. In this mode, the email client goes through all possible connection parameters until the connection is established. SMTP, IMAP, and POP3 servers in case of correct connection establishing send greeting string to the client. Servers may use implicit or explicit (START TLS) SSL/TLS connection initiation. If connection mode is mismatched (for instance, the server waits for an implicit SSL connection but the client tries to establish a non-secured or explicit SSL connection), the server won’t send a greeting string. In this case, the user will wait a long time until the timeout reaches a greeting string, and the client goes to the next connection option. To avoid this problem, the GreetingTimeout property has been introduced. This property allows you to set the timeout for greeting string, and reduce the time of automatic connection establishment.

Value: The greeting timeout in milliseconds

Returns: int

getHelloMessage()

public final String getHelloMessage()

Gets or sets a HELO/EHLO string.

Returns: java.lang.String

getHost()

public String getHost()

Gets or sets the host name.

Value: The host name.

Returns: java.lang.String

getLogFileName()

public final String getLogFileName()

Gets or sets log file name

Returns: java.lang.String

getPassword()

public String getPassword()

Gets or sets the password. Password limitations are defined by server implementation, which client connects.

Value: The string that represents the password.

Returns: java.lang.String

getPickupDirectoryLocation()

public final String getPickupDirectoryLocation()

Gets or sets the directory where applications save mail messages to be processed by the local SMTP server. Please note: only absolute path is allowed.

Value: A String that represents the pickup directory

Returns: java.lang.String

getPort()

public int getPort()

Gets or sets the port.

Value: The port number.

Returns: int

getProxy()

public Proxy getProxy()

Gets or sets proxy for the client

Returns: Proxy

getSecurityOptions()

public int getSecurityOptions()

Security mode for a mail client

Returns: int

getSmtpQueueLocation()

public final String getSmtpQueueLocation()

Gets or sets the directory where applications save mail messages to be processed by sending in SMTP queue. Please note: only absolute path is allowed.

Value: A String that represents the pickup directory

Returns: java.lang.String

getSupportedAuthentication()

public final long getSupportedAuthentication()

Gets enumeration of supported by server authentication types

Returns: long

getSupportedEncryption()

public int getSupportedEncryption()

Defines the versions of SSL/TLS encryption protocols to be used. PLEASE PAY YOUR ATTENTION, you may set only those versions of protocol, which are supported by .net framework. IF SOME VERSIONS OF PROTOCOL ARE NOT SUPPORTED BY YOUR CURRENT VERSION OF FRAMEWORK, THEY WILL BE IGNORED AND SKIPPED. IT MAY LEAD TO DOWNGRADE TLS SECURITY LEVEL. IN THIS CASE EXCEPTION WON’T BE GENERATED!!! Please, see EncryptionProtocols documentation for more details. Please use #setSupportedEncryptionUnsafe(int).setSupportedEncryptionUnsafe(int) method if you want to set the encryption protocols without any compatibility checks. Default value is: Tls | Tls11 | Tls12 | Tls13 (in case if your current version of .net framework supports these versions of TLS)

Returns: int

getTimeout()

public final int getTimeout()

Gets or sets the timeout for mail operations

Value: The timeout in milliseconds

Returns: int

getTokenProvider()

public final ITokenProvider getTokenProvider()

Gets or sets TokenProvider allowing to retrieve access token.

Returns: ITokenProvider

getUseAuthentication()

public boolean getUseAuthentication()

Indicates whether authentication is used.

Returns: boolean

getUseDateInLogFileName()

public final boolean getUseDateInLogFileName()

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

Returns: boolean

getUseDefaultCredentials()

public boolean getUseDefaultCredentials()

Gets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests.

Returns: boolean

getUseMultiConnection()

public int getUseMultiConnection()

Gets or sets value which indicates if client has to use multiple connections for heavy loaded operations. Please note, using of this mode not necessary has to lead to performance increasing.

Returns: int

getUsePipelining()

public PipeliningStatus getUsePipelining()

Gets or sets object which indicates whether the pipelining mode is enabled.

Returns: PipeliningStatus

getUseTnef()

public final boolean getUseTnef()

Gets or sets a boolean value that controls whether the messages are sent in TNEF format. Note, that now message is sent in TNEF format when being loaded a message contains tnef.

Returns: boolean

getUsername()

public String getUsername()

Gets or sets the username.

Value: The username string.

Returns: java.lang.String

hashCode()

public native int hashCode()

Returns: int

noop()

public void noop()

‘No operation’ command

noop(IConnection connection)

public void noop(IConnection connection)

‘No operation’ command

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

resetLogSettings()

public final void resetLogSettings()

Resets logging settings to default.

send(IConnection connection, MailMessage message)

public final void send(IConnection connection, MailMessage message)

Send the specified message.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
messageMailMessageThe MailMessage that represents an email-message.

send(IConnection connection, MailMessage[] messages)

public final void send(IConnection connection, MailMessage[] messages)

Send the specified message.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
messagesMailMessage[]The array of MailMessage that represents an email-messages to send.

send(IConnection connection, MailMessageCollection messages)

public final void send(IConnection connection, MailMessageCollection messages)

Send the specified message collection.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
messagesMailMessageCollectionThe collection of messages.

send(IConnection connection, Iterable messages)

public final void send(IConnection connection, Iterable<MailMessage> messages)

Send the specified messages.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
messagesjava.lang.Iterable<com.aspose.email.MailMessage>The IEnumerator that supports a message iteration.

send(IConnection connection, String from, String recipients, String subject, String body)

public final void send(IConnection connection, String from, String recipients, String subject, String body)

Creates and sends the specified message.

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server
fromjava.lang.StringA String that contains the address of message sender.
recipientsjava.lang.StringA String that contains the address of recipients.
subjectjava.lang.StringA subject of message.
bodyjava.lang.StringA body of message.

send(MailMessage message)

public final void send(MailMessage message)

Send the specified message.

Parameters:

ParameterTypeDescription
messageMailMessageThe MailMessage that represents an email-message.

send(MailMessage[] messages)

public final void send(MailMessage[] messages)

Send the specified message.

Parameters:

ParameterTypeDescription
messagesMailMessage[]The array of MailMessage that represents an email-messages to send.

send(MailMessageCollection messages)

public final void send(MailMessageCollection messages)

Send the specified message collection.

Parameters:

ParameterTypeDescription
messagesMailMessageCollectionThe collection of messages.

send(Iterable messages)

public final void send(Iterable<MailMessage> messages)

Send the specified messages.

Parameters:

ParameterTypeDescription
messagesjava.lang.Iterable<com.aspose.email.MailMessage>The IEnumerator that supports a message iteration.

send(String from, String recipients, String subject, String body)

public final void send(String from, String recipients, String subject, String body)

Creates and sends the specified message.

Parameters:

ParameterTypeDescription
fromjava.lang.StringA String that contains the address of message sender.
recipientsjava.lang.StringA String that contains the address of recipients.
subjectjava.lang.StringA subject of message.
bodyjava.lang.StringA body of message.

sendToQueue(Iterable messages)

public final void sendToQueue(Iterable<MailMessage> messages)

Append messages to queue

Parameters:

ParameterTypeDescription
messagesjava.lang.Iterable<com.aspose.email.MailMessage>MailMessages to send

setAccessToken(String value)

public void setAccessToken(String value)

Gets or sets the access token.

Value: The string that represents access token.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setAllowedAuthentication(long value)

public final void setAllowedAuthentication(long value)

Gets or sets enumeration of allowed by user authentication types

Parameters:

ParameterTypeDescription
valuelong

setConnectionAsgmtMode(int value)

public void setConnectionAsgmtMode(int value)

Gets or sets value which defines mode of connection allocation in multiple threads environment There are folowing connection types: - Main connection is connection created and disposed together with mail client.It can’t be created or disposed manually. - Default connection is connection default for some thread. If default connection exists and ConnectionAsgmtMode allow, all methods of email client executed in this thread will be implicitly use this connection. Only one default connection can be exist per thread. It can be created manually or automatically. It depends on EmailClient.ConnectionAsgmtMode property. These connections can be created manually with EmailClient.CreateConnection(createAsDefaultConnection = true) method. If default connection does not used(depends on connection allocation mode), main connection used implicitly instead of it. - Independent connections are connections that are not linked to threads.They can be created manually and has to be used explicitly as method parameter. These connections can be created manually with EmailClient.CreateConnection() method or EmailClient.CreateConnection(createAsDefaultConnection = false) method. There are folowing connection allocation types: - ConnectionAsgmtType.UseMainOrDefault This mode uses by default in email clients. Email client uses main connection for all operations from multiple threads if default connection hasn’t been created, or connection hasnt been passed as method parameter explicitly. Main connection is connection which is created in the same time like email client. User can create default connections for threads with CreateConnection method. If default connection for thread is created, it’s used implicitly for all methods of email client which are invoked in this thread. If default connection for thread is not created, main connection is used for all methods of email client which are invoked in this thread. User also can create connections not linked with threads (not default connections) with CreateConnection method. If user wants to use other connections (not main and not default) he has to pass this connection explicitly as parameter of a method which he wants to use. User can additionally create any number of connections. Default connection can be only one per thread. Please note default connections works correctly if user uses Thread objects for multitasking programming. If user uses ConnectionPool or uses Task objects for multitasking programming this mode may lead to wrong behaviour of a programm. To avoid this problem user has to manually dispose default conection (if he uses it) in the end of the code which executes in the thread. - ConnectionAsgmtType.UseMain Email client uses main connection for all operations from multiple threads. Main connection is connection which is created in the same time like email client. User cann’t create default connections. User can create connections not linked with threads (not default connections) with CreateConnection method. If user wants to use other connections (not main and not default) he has to pass this connection explicitly as parameter of a method which he wants to use. User can additionally create any number of connections. - ConnectionAsgmtType.UseDefault Email client uses implicitly only default connections for all operations from multiple threads. Main connection is not used in this mode. If default connection hasn’t been created for some thread (first invocation of email client method), email client creates default connection implicitly for thread before first operation is executed. User can’t create default connections for threads with CreateConnection method because they are created automatically. When default connection for thread is created, it’s used implicitly for all methods of email client which are invoked in this thread.read. User also can create connections not linked with threads (not default connections) with CreateConnection method. If user wants to use other connections (not main and not default) he has to pass this connection explicitly as parameter of a method which he wants to use. User can additionally create any number of connections. Default connection can be only one per thread. Please note default connections works correctly if user uses Thread objects for multitasking programming. If user uses ConnectionPool or uses Task objects for multitasking programming this mode may lead to wrong behaviour of a programm. To avoid this problem user has to manually dispose default conection in the end of the code which executes in the thread.

Parameters:

ParameterTypeDescription
valueint

setConnectionCheckupPeriod(int value)

public void setConnectionCheckupPeriod(int value)

Period of connection checking up in milliseconds. Default value is 5 min.

Parameters:

ParameterTypeDescription
valueint

setConnectionsQuantity(int value)

public void setConnectionsQuantity(int value)

Gets or sets quantity of connections in multy-connection mode

Parameters:

ParameterTypeDescription
valueint

setDeliveryMethod(int value)

public final void setDeliveryMethod(int value)

Gets or sets the delivery method.

Value: An SmtpDeliveryMethod that indicates how messages are delivered.

Parameters:

ParameterTypeDescription
valueint

setEnableLogger(boolean value)

public final void setEnableLogger(boolean value)

Gets or sets value which allows enable/disable logger

Parameters:

ParameterTypeDescription
valueboolean

setFailedSending(System.EventHandler handler)

public void setFailedSending(System.EventHandler<FailedMailMessageEventArgs> handler)

Adds or removes subscriber for notifications about failed sending operations in smtp queue

Parameters:

ParameterTypeDescription
handlercom.aspose.ms.System.EventHandler<com.aspose.email.FailedMailMessageEventArgs>

setGreetingTimeout(int value)

public final void setGreetingTimeout(int value)

Gets or sets the greeting timeout that is used when establishing a connection. Please note, greeting timeout can’t be infinite. Email clients may execute enough long operations. To limit the time of operations users have to use EmailClient.Timeout (#getTimeout.getTimeout/#setTimeout(int).setTimeout(int)) property. Values for this property have to have long intervals to not prevent long-time operations. But in some cases, if EmailClient will use only Timeout property connection establishing may take a long time. For instance, the mail client may use the automatic mode to connection establishing. In this mode, the email client goes through all possible connection parameters until the connection is established. SMTP, IMAP, and POP3 servers in case of correct connection establishing send greeting string to the client. Servers may use implicit or explicit (START TLS) SSL/TLS connection initiation. If connection mode is mismatched (for instance, the server waits for an implicit SSL connection but the client tries to establish a non-secured or explicit SSL connection), the server won’t send a greeting string. In this case, the user will wait a long time until the timeout reaches a greeting string, and the client goes to the next connection option. To avoid this problem, the GreetingTimeout property has been introduced. This property allows you to set the timeout for greeting string, and reduce the time of automatic connection establishment.

Value: The greeting timeout in milliseconds

Parameters:

ParameterTypeDescription
valueint

setHelloMessage(String value)

public final void setHelloMessage(String value)

Gets or sets a HELO/EHLO string.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setHost(String value)

public void setHost(String value)

Gets or sets the host name.

Value: The host name.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setLogFileName(String value)

public final void setLogFileName(String value)

Gets or sets log file name

Parameters:

ParameterTypeDescription
valuejava.lang.String

setPassword(String value)

public void setPassword(String value)

Gets or sets the password. Password limitations are defined by server implementation, which client connects.

Value: The string that represents the password.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setPickupDirectoryLocation(String value)

public final void setPickupDirectoryLocation(String value)

Gets or sets the directory where applications save mail messages to be processed by the local SMTP server. Please note: only absolute path is allowed.

Value: A String that represents the pickup directory

Parameters:

ParameterTypeDescription
valuejava.lang.String

setPort(int value)

public void setPort(int value)

Gets or sets the port.

Value: The port number.

Parameters:

ParameterTypeDescription
valueint

setProxy(Proxy value)

public void setProxy(Proxy value)

Gets or sets proxy for the client

Parameters:

ParameterTypeDescription
valueProxy

setSecurityOptions(int value)

public void setSecurityOptions(int value)

Security mode for a mail client

Parameters:

ParameterTypeDescription
valueint

setShowCredentialsInLog(boolean value)

public static void setShowCredentialsInLog(boolean value)

Sets value indicating whether Credentials should be displayed in the log. By default, is False.

Parameters:

ParameterTypeDescription
valuebooleanTrue if Credentials should be displayed in the log.

setSmtpQueueLocation(String value)

public final void setSmtpQueueLocation(String value)

Gets or sets the directory where applications save mail messages to be processed by sending in SMTP queue. Please note: only absolute path is allowed.

Value: A String that represents the pickup directory

Parameters:

ParameterTypeDescription
valuejava.lang.String

setSocketsLayerVersion2(boolean value)

public static void setSocketsLayerVersion2(boolean value)

Sets value indicating whether Sockets Layer version 2 is used. By default, Sockets Layer version 2 is used.

Parameters:

ParameterTypeDescription
valuebooleanFalse if Sockets Layer version 1 should be used.

setSocketsLayerVersion2DisableSSLCertificateValidation(boolean value)

public static void setSocketsLayerVersion2DisableSSLCertificateValidation(boolean value)

Disable SSL certificate validation for Sockets Layer version 2

Parameters:

ParameterTypeDescription
valueboolean

setSocketsLayerVersion2SSLSocketFactory(SSLSocketFactory value)

public static void setSocketsLayerVersion2SSLSocketFactory(SSLSocketFactory value)

Set SSL Socket Factory for Sockets Layer version 2

Parameters:

ParameterTypeDescription
valuejavax.net.ssl.SSLSocketFactory

setSucceededSending(System.EventHandler handler)

public void setSucceededSending(System.EventHandler<MailMessageEventArgs> handler)

Adds or removes subscriber for notifications about succeeded sending of mail messages. Please note, notifications will be invoked from other threads, so you should to implement thread safe event handler. Also note that this event is common to the mail client instance, in case if the client is running in multi-connection mode, messages from all connections will be processed through this event. So the customer has to analyze in his code message from events to understand which message relates to which operation.

Parameters:

ParameterTypeDescription
handlercom.aspose.ms.System.EventHandler<com.aspose.email.MailMessageEventArgs>

setSupportedEncryption(int value)

public void setSupportedEncryption(int value)

Defines the versions of SSL/TLS encryption protocols to be used. PLEASE PAY YOUR ATTENTION, you may set only those versions of protocol, which are supported by .net framework. IF SOME VERSIONS OF PROTOCOL ARE NOT SUPPORTED BY YOUR CURRENT VERSION OF FRAMEWORK, THEY WILL BE IGNORED AND SKIPPED. IT MAY LEAD TO DOWNGRADE TLS SECURITY LEVEL. IN THIS CASE EXCEPTION WON’T BE GENERATED!!! Please, see EncryptionProtocols documentation for more details. Please use #setSupportedEncryptionUnsafe(int).setSupportedEncryptionUnsafe(int) method if you want to set the encryption protocols without any compatibility checks. Default value is: Tls | Tls11 | Tls12 | Tls13 (in case if your current version of .net framework supports these versions of TLS)

Parameters:

ParameterTypeDescription
valueint

setSupportedEncryptionUnsafe(int value)

public final void setSupportedEncryptionUnsafe(int value)

Defines the versions of SSL/TLS encryption protocols to be used. This method is not safe and sets the encryption protocols without any compatibility checks. Use SupportedEncryption (#getSupportedEncryption.getSupportedEncryption/#setSupportedEncryption(int).setSupportedEncryption(int)) property to safely set only protocols that definitely supported by framework. Please note, if your current framework does not support this level of security, an exception will be thrown when trying to establish a connection to the server.

Parameters:

ParameterTypeDescription
valueint

setTimeout(int value)

public final void setTimeout(int value)

Gets or sets the timeout for mail operations

Value: The timeout in milliseconds

Parameters:

ParameterTypeDescription
valueint

setTokenProvider(ITokenProvider value)

public final void setTokenProvider(ITokenProvider value)

Gets or sets TokenProvider allowing to retrieve access token.

Parameters:

ParameterTypeDescription
valueITokenProvider

setUseAuthentication(boolean value)

public void setUseAuthentication(boolean value)

Indicates whether authentication is used.

Parameters:

ParameterTypeDescription
valueboolean

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

setUseDefaultCredentials(boolean value)

public void setUseDefaultCredentials(boolean value)

Gets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests.

Parameters:

ParameterTypeDescription
valueboolean

setUseMultiConnection(int value)

public void setUseMultiConnection(int value)

Gets or sets value which indicates if client has to use multiple connections for heavy loaded operations. Please note, using of this mode not necessary has to lead to performance increasing.

Parameters:

ParameterTypeDescription
valueint

setUsePipelining(PipeliningStatus value)

public void setUsePipelining(PipeliningStatus value)

Gets or sets object which indicates whether the pipelining mode is enabled.

Parameters:

ParameterTypeDescription
valuePipeliningStatus

setUseTnef(boolean value)

public final void setUseTnef(boolean value)

Gets or sets a boolean value that controls whether the messages are sent in TNEF format. Note, that now message is sent in TNEF format when being loaded a message contains tnef.

Parameters:

ParameterTypeDescription
valueboolean

setUsername(String value)

public void setUsername(String value)

Gets or sets the username.

Value: The username string.

Parameters:

ParameterTypeDescription
valuejava.lang.String

toString()

public String toString()

Returns: java.lang.String

usePasswordQuotes(boolean value)

public static void usePasswordQuotes(boolean value)

Sets a value indicating whether Quotes should be used in login password syntax with special characters. By default, is True.

Parameters:

ParameterTypeDescription
valuebooleanFalse if Quotes should not be used in login password syntax.

validateCredentials()

public boolean validateCredentials()

Executes credentials validation

Returns: boolean - True if authentication was successful, otherwise false.

validateCredentials(IConnection connection)

public final boolean validateCredentials(IConnection connection)

Executes credentials validation

Parameters:

ParameterTypeDescription
connectionIConnectionConnection to a server

Returns: boolean - True if authentication was successful, otherwise false.

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