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

Constructor Description
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

Method Description
getDefaultPort() Gets default port for client
getHelloMessage() Gets or sets a HELO/EHLO string.
setHelloMessage(String value) Gets or sets a HELO/EHLO string.
getDeliveryMethod() Gets or sets the delivery method.
setDeliveryMethod(int value) Gets or sets the delivery method.
getPickupDirectoryLocation() Gets or sets the directory where applications save mail messages to be processed by the local SMTP server.
setPickupDirectoryLocation(String value) Gets or sets the directory where applications save mail messages to be processed by the local SMTP server.
getSmtpQueueLocation() Gets or sets the directory where applications save mail messages to be processed by sending in SMTP queue.
setSmtpQueueLocation(String value) Gets or sets the directory where applications save mail messages to be processed by sending in SMTP queue.
setFailedSending(System.EventHandler handler) Adds or removes subscriber for notifications about failed sending operations in smtp queue
setSucceededQueueSending(System.EventHandler handler) Adds or removes subscriber for notifications about succeeded sending operations in smtp queue
setSucceededSending(System.EventHandler handler) Adds or removes subscriber for notifications about succeeded sending of mail messages.
getUseDefaultCredentials() Gets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests.
setUseDefaultCredentials(boolean value) Gets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests.
getUseTnef() Gets or sets a boolean value that controls whether the messages are sent in TNEF format.
setUseTnef(boolean value) Gets or sets a boolean value that controls whether the messages are sent in TNEF format.
getAllowedAuthentication() Gets or sets enumeration of allowed by user authentication types
setAllowedAuthentication(long value) Gets or sets enumeration of allowed by user authentication types
getSupportedAuthentication() Gets enumeration of supported by server authentication types
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, 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.
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(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.
endForward(System.IAsyncResult asyncResult) Waits for the asynchronous operation to complete.
forward(IConnection connection, String sender, String recipient, MailMessage message) Forwards specified message to recipient
forward(IConnection connection, String sender, MailAddressCollection recipients, MailMessage message) Forwards specified message to recipient
forward(String sender, String recipient, MailMessage message) Forwards specified message to recipient
forward(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(String sender, MailAddressCollection recipients, InputStream messageStream) Forwards specified message to recipient
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() 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
endNoop(System.IAsyncResult asyncResult) Waits for the pending asynchronous operation to complete.
noop(IConnection connection) ‘No operation’ command
noop() ‘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, 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(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(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(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.
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(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(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.
endSend(System.IAsyncResult asyncResult) Waits for the asynchronous operation to complete.
send(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(IConnection connection, String from, String recipients, String subject, String body) Creates and sends the specified message.
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.
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
endBeginSendQueue(System.IAsyncResult asyncResult) Waits for the pending asynchronous operation to complete.
sendToQueue(Iterable messages) Append messages to queue
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() 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
endValidateCredentials(System.IAsyncResult asyncResult) Waits for the pending asynchronous operation to complete.
validateCredentials(IConnection connection) Executes credentials validation
validateCredentials() Executes credentials validation

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:

Parameter Type Description
host java.lang.String The 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:

Parameter Type Description
host java.lang.String The name of the host used for SMTP.
securityOptions short Security 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:

Parameter Type Description
host java.lang.String The name of the host used for SMTP.
port int The 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:

Parameter Type Description
host java.lang.String The name of the host used for SMTP.
port int The port used for SMTP.
securityOptions int Security 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:

Parameter Type Description
host java.lang.String The name of the host used for SMTP.
username java.lang.String The username.
password java.lang.String The 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:

Parameter Type Description
host java.lang.String The name of the host used for SMTP.
username java.lang.String The username.
password java.lang.String The password.
securityOptions int Security 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:

Parameter Type Description
host java.lang.String The name of the host used for SMTP.
port int The port used for SMTP.
username java.lang.String The username.
password java.lang.String The 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:

Parameter Type Description
host java.lang.String The name of the host used for SMTP.
port int The port used for SMTP.
username java.lang.String The username.
password java.lang.String The password.
securityOptions int Security 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:

Parameter Type Description
host java.lang.String The name of the host used for SMTP.
username java.lang.String The username.
authInfo java.lang.String The user password or XOAUTH2 access token
useOAuth boolean Defines 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:

Parameter Type Description
host java.lang.String The name of the host used for SMTP.
username java.lang.String The username.
authInfo java.lang.String The user password or XOAUTH2 access token
useOAuth boolean Defines whether SASL XOAUTH2 mechanism is used to login to the server
securityOptions int Security 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:

Parameter Type Description
host java.lang.String The name of the host used for SMTP.
port int The port used for SMTP.
username java.lang.String The username.
authInfo java.lang.String The user password or XOAUTH2 access token
useOAuth boolean Defines 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:

Parameter Type Description
host java.lang.String The name of the host used for SMTP.
port int The port used for SMTP.
username java.lang.String The username.
authInfo java.lang.String The user password or XOAUTH2 access token
useOAuth boolean Defines whether SASL XOAUTH2 mechanism is used to login to the server
securityOptions int Security 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:

Parameter Type Description
host java.lang.String The name of the host used for SMTP.
username java.lang.String The username.
tokenProvider ITokenProvider TokenProvider 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:

Parameter Type Description
host java.lang.String The name of the host used for SMTP.
username java.lang.String The username.
tokenProvider ITokenProvider TokenProvider allowing to retrieve access token.
securityOptions int Security 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:

Parameter Type Description
host java.lang.String The name of the host used for SMTP.
port int The port used for SMTP.
username java.lang.String The username.
tokenProvider ITokenProvider TokenProvider 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:

Parameter Type Description
host java.lang.String The name of the host used for SMTP.
port int The port used for SMTP.
username java.lang.String The username.
tokenProvider ITokenProvider TokenProvider allowing to retrieve access token.
securityOptions int Security mode for a mail client

getDefaultPort()

public int getDefaultPort()

Gets default port for client

Returns: int

getHelloMessage()

public final String getHelloMessage()

Gets or sets a HELO/EHLO string.

Returns: java.lang.String

setHelloMessage(String value)

public final void setHelloMessage(String value)

Gets or sets a HELO/EHLO string.

Parameters:

Parameter Type Description
value java.lang.String

getDeliveryMethod()

public final int getDeliveryMethod()

Gets or sets the delivery method.

Value: An SmtpDeliveryMethod that indicates how messages are delivered.

Returns: int

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:

Parameter Type Description
value int

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

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:

Parameter Type Description
value java.lang.String

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

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:

Parameter Type Description
value java.lang.String

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:

Parameter Type Description
handler com.aspose.ms.System.EventHandler<com.aspose.email.FailedMailMessageEventArgs>

setSucceededQueueSending(System.EventHandler handler)

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

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

Parameters:

Parameter Type Description
handler com.aspose.ms.System.EventHandler<com.aspose.email.MailMessageEventArgs>

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:

Parameter Type Description
handler com.aspose.ms.System.EventHandler<com.aspose.email.MailMessageEventArgs>

getUseDefaultCredentials()

public boolean getUseDefaultCredentials()

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

Returns: boolean

setUseDefaultCredentials(boolean value)

public void setUseDefaultCredentials(boolean value)

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

Parameters:

Parameter Type Description
value boolean

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

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:

Parameter Type Description
value boolean

getAllowedAuthentication()

public final long getAllowedAuthentication()

Gets or sets enumeration of allowed by user authentication types

Returns: long

setAllowedAuthentication(long value)

public final void setAllowedAuthentication(long value)

Gets or sets enumeration of allowed by user authentication types

Parameters:

Parameter Type Description
value long

getSupportedAuthentication()

public final long getSupportedAuthentication()

Gets enumeration of supported by server authentication types

Returns: long

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:

Parameter Type Description
connection IConnection Connection to a server
sender java.lang.String Sender of the forwarded message.
recipient java.lang.String Recipient of the forwarded message.
message MailMessage The 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:

Parameter Type Description
connection IConnection Connection to a server
sender java.lang.String Sender of the forwarded message.
recipient java.lang.String Recipients of the forwarded message.
message MailMessage The message for a forwarding.
callback com.aspose.ms.System.AsyncCallback References 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:

Parameter Type Description
connection IConnection Connection to a server
sender java.lang.String Sender of the forwarded message.
recipient java.lang.String Recipients of the forwarded message.
message MailMessage The message for a forwarding.
callback com.aspose.ms.System.AsyncCallback References a method to be called when a corresponding asynchronous operation completes.
state java.lang.Object The 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:

Parameter Type Description
sender java.lang.String Sender of the forwarded message.
recipient java.lang.String Recipients of the forwarded message.
message MailMessage The 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:

Parameter Type Description
sender java.lang.String Sender of the forwarded message.
recipient java.lang.String Recipients of the forwarded message.
message MailMessage The message for a forwarding.
callback com.aspose.ms.System.AsyncCallback References 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:

Parameter Type Description
sender java.lang.String Sender of the forwarded message.
recipient java.lang.String Recipients of the forwarded message.
message MailMessage The message for a forwarding.
callback com.aspose.ms.System.AsyncCallback References a method to be called when a corresponding asynchronous operation completes.
state java.lang.Object The state.

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

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:

Parameter Type Description
connection IConnection Connection to a server
sender java.lang.String Sender of the forwarded message.
recipients MailAddressCollection Recipients of the forwarded message.
message MailMessage The 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:

Parameter Type Description
connection IConnection Connection to a server
sender java.lang.String Sender of the forwarded message.
recipients MailAddressCollection Recipients of the forwarded message.
message MailMessage The message for a forwarding.
callback com.aspose.ms.System.AsyncCallback References 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:

Parameter Type Description
connection IConnection Connection to a server
sender java.lang.String Sender of the forwarded message.
recipients MailAddressCollection Recipients of the forwarded message.
message MailMessage The message for a forwarding.
callback com.aspose.ms.System.AsyncCallback References a method to be called when a corresponding asynchronous operation completes.
state java.lang.Object The 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:

Parameter Type Description
sender java.lang.String Sender of the forwarded message.
recipients MailAddressCollection Recipients of the forwarded message.
message MailMessage The 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:

Parameter Type Description
sender java.lang.String Sender of the forwarded message.
recipients MailAddressCollection Recipients of the forwarded message.
message MailMessage The message for a forwarding.
callback com.aspose.ms.System.AsyncCallback References 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:

Parameter Type Description
sender java.lang.String Sender of the forwarded message.
recipients MailAddressCollection Recipients of the forwarded message.
message MailMessage The message for a forwarding.
callback com.aspose.ms.System.AsyncCallback References a method to be called when a corresponding asynchronous operation completes.
state java.lang.Object The state.

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

endForward(System.IAsyncResult asyncResult)

public final void endForward(System.IAsyncResult asyncResult)

Waits for the asynchronous operation to complete.

Parameters:

Parameter Type Description
asyncResult com.aspose.ms.System.IAsyncResult The reference to the pending asynchronous request to wait for.

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:

Parameter Type Description
connection IConnection Connection to a server
sender java.lang.String Sender of the forwarded message.
recipient java.lang.String Recipient of the forwarded message.
message MailMessage The message for a forwarding.

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:

Parameter Type Description
connection IConnection Connection to a server
sender java.lang.String Sender of the forwarded message.
recipients MailAddressCollection Recipients of the forwarded message.
message MailMessage The message for a forwarding.

forward(String sender, String recipient, MailMessage message)

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

Forwards specified message to recipient

Parameters:

Parameter Type Description
sender java.lang.String Sender of the forwarded message.
recipient java.lang.String Recipient of the forwarded message.
message MailMessage The 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:

Parameter Type Description
sender java.lang.String Sender of the forwarded message.
recipients MailAddressCollection Recipients of the forwarded message.
message MailMessage The 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:

Parameter Type Description
connection IConnection Connection to a server
sender java.lang.String Sender of the forwarded message.
recipients MailAddressCollection Recipients of the forwarded message.
messageStream java.io.InputStream The stream that represents message in eml format.

forward(String sender, MailAddressCollection recipients, InputStream messageStream)

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

Forwards specified message to recipient

Parameters:

Parameter Type Description
sender java.lang.String Sender of the forwarded message.
recipients MailAddressCollection Recipients of the forwarded message.
messageStream java.io.InputStream The stream that represents message in eml format.

beginNoop(IConnection connection)

public final System.IAsyncResult beginNoop(IConnection connection)

Begins to execute ‘No operation’ command

Parameters:

Parameter Type Description
connection IConnection Connection 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:

Parameter Type Description
connection IConnection Connection to a server
callback com.aspose.ms.System.AsyncCallback References 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:

Parameter Type Description
connection IConnection Connection to a server
callback com.aspose.ms.System.AsyncCallback References a method to be called when a corresponding asynchronous operation completes.
state java.lang.Object The 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(System.AsyncCallback callback)

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

Begins to execute ‘No operation’ command

Parameters:

Parameter Type Description
callback com.aspose.ms.System.AsyncCallback References 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:

Parameter Type Description
callback com.aspose.ms.System.AsyncCallback References a method to be called when a corresponding asynchronous operation completes.
state java.lang.Object The state.

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

endNoop(System.IAsyncResult asyncResult)

public final void endNoop(System.IAsyncResult asyncResult)

Waits for the pending asynchronous operation to complete.

Parameters:

Parameter Type Description
asyncResult com.aspose.ms.System.IAsyncResult The reference to the pending asynchronous request to wait for.

noop(IConnection connection)

public void noop(IConnection connection)

‘No operation’ command

Parameters:

Parameter Type Description
connection IConnection Connection to a server

noop()

public void noop()

‘No operation’ command

beginSend(IConnection connection, MailMessage message)

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

Begins sending email asynchronously.

Parameters:

Parameter Type Description
connection IConnection Connection to a server
message MailMessage Represents 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:

Parameter Type Description
connection IConnection Connection to a server
message MailMessage Represents an e-mail message
callback com.aspose.ms.System.AsyncCallback References 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:

Parameter Type Description
connection IConnection Connection to a server
message MailMessage Represents an e-mail message
callback com.aspose.ms.System.AsyncCallback References a method to be called when a corresponding asynchronous operation completes.
state java.lang.Object The 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:

Parameter Type Description
connection IConnection Connection to a server
from java.lang.String A String that contains the address of message sender.
recipients java.lang.String A String that contains the address of recipients.
subject java.lang.String A subject of message.
body java.lang.String A 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:

Parameter Type Description
connection IConnection Connection to a server
from java.lang.String A String that contains the address of message sender.
recipients java.lang.String A String that contains the address of recipients.
subject java.lang.String A subject of message.
body java.lang.String A body of message.
callback com.aspose.ms.System.AsyncCallback References 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:

Parameter Type Description
connection IConnection Connection to a server
from java.lang.String A String that contains the address of message sender.
recipients java.lang.String A String that contains the address of recipients.
subject java.lang.String A subject of message.
body java.lang.String A body of message.
callback com.aspose.ms.System.AsyncCallback References a method to be called when a corresponding asynchronous operation completes.
state java.lang.Object The 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:

Parameter Type Description
connection IConnection Connection to a server
messages 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)

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

Begins sending email asynchronously.

Parameters:

Parameter Type Description
connection IConnection Connection to a server
messages java.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:

Parameter Type Description
connection IConnection Connection to a server
messages java.lang.Iterable<com.aspose.email.MailMessage> The array of MailMessage that represents an email-messages to send.
callback com.aspose.ms.System.AsyncCallback References 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:

Parameter Type Description
connection IConnection Connection to a server
messages java.lang.Iterable<com.aspose.email.MailMessage> The array of MailMessage that represents an email-messages to send.
callback com.aspose.ms.System.AsyncCallback References a method to be called when a corresponding asynchronous operation completes.
state java.lang.Object The 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:

Parameter Type Description
message MailMessage Represents 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:

Parameter Type Description
message MailMessage Represents an e-mail message
callback com.aspose.ms.System.AsyncCallback References 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:

Parameter Type Description
message MailMessage Represents an e-mail message
callback com.aspose.ms.System.AsyncCallback References a method to be called when a corresponding asynchronous operation completes.
state java.lang.Object The 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:

Parameter Type Description
from java.lang.String A String that contains the address of message sender.
recipients java.lang.String A String that contains the address of recipients.
subject java.lang.String A subject of message.
body java.lang.String A 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:

Parameter Type Description
from java.lang.String A String that contains the address of message sender.
recipients java.lang.String A String that contains the address of recipients.
subject java.lang.String A subject of message.
body java.lang.String A body of message.
callback com.aspose.ms.System.AsyncCallback References 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:

Parameter Type Description
from java.lang.String A String that contains the address of message sender.
recipients java.lang.String A String that contains the address of recipients.
subject java.lang.String A subject of message.
body java.lang.String A body of message.
callback com.aspose.ms.System.AsyncCallback References a method to be called when a corresponding asynchronous operation completes.
state java.lang.Object The 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:

Parameter Type Description
messages 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)

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

Begins sending email asynchronously.

Parameters:

Parameter Type Description
messages java.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:

Parameter Type Description
messages java.lang.Iterable<com.aspose.email.MailMessage> The array of MailMessage that represents an email-messages to send.
callback com.aspose.ms.System.AsyncCallback References 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:

Parameter Type Description
messages java.lang.Iterable<com.aspose.email.MailMessage> The array of MailMessage that represents an email-messages to send.
callback com.aspose.ms.System.AsyncCallback References a method to be called when a corresponding asynchronous operation completes.
state java.lang.Object The 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:

Parameter Type Description
connection IConnection Connection to a server
messages java.lang.Iterable<com.aspose.email.MailMessage> The array of MailMessage that represents an email-messages to send.
messageSentDelegate com.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:

Parameter Type Description
connection IConnection Connection to a server
messages java.lang.Iterable<com.aspose.email.MailMessage> The array of MailMessage that represents an email-messages to send.
messageSentDelegate com.aspose.ms.System.EventHandler<com.aspose.email.MailMessageEventArgs> References a method to be called when a message has been sent.
callback com.aspose.ms.System.AsyncCallback References 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:

Parameter Type Description
connection IConnection Connection to a server
messages java.lang.Iterable<com.aspose.email.MailMessage> The array of MailMessage that represents an email-messages to send.
messageSentDelegate com.aspose.ms.System.EventHandler<com.aspose.email.MailMessageEventArgs> References a method to be called when a message has been sent.
callback com.aspose.ms.System.AsyncCallback References a method to be called when a corresponding asynchronous operation completes.
state java.lang.Object The 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:

Parameter Type Description
messages java.lang.Iterable<com.aspose.email.MailMessage> The array of MailMessage that represents an email-messages to send.
messageSentDelegate com.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:

Parameter Type Description
messages java.lang.Iterable<com.aspose.email.MailMessage> The array of MailMessage that represents an email-messages to send.
messageSentDelegate com.aspose.ms.System.EventHandler<com.aspose.email.MailMessageEventArgs> References a method to be called when a message has been sent.
callback com.aspose.ms.System.AsyncCallback References 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:

Parameter Type Description
messages java.lang.Iterable<com.aspose.email.MailMessage> The array of MailMessage that represents an email-messages to send.
messageSentDelegate com.aspose.ms.System.EventHandler<com.aspose.email.MailMessageEventArgs> References a method to be called when a message has been sent.
callback com.aspose.ms.System.AsyncCallback References a method to be called when a corresponding asynchronous operation completes.
state java.lang.Object The state.

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

endSend(System.IAsyncResult asyncResult)

public final void endSend(System.IAsyncResult asyncResult)

Waits for the asynchronous operation to complete.

Parameters:

Parameter Type Description
asyncResult com.aspose.ms.System.IAsyncResult The reference to the pending asynchronous request to wait for.

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:

Parameter Type Description
from java.lang.String A String that contains the address of message sender.
recipients java.lang.String A String that contains the address of recipients.
subject java.lang.String A subject of message.
body java.lang.String A body of message.

send(MailMessage message)

public final void send(MailMessage message)

Send the specified message.

Parameters:

Parameter Type Description
message MailMessage The MailMessage that represents an email-message.

send(MailMessage[] messages)

public final void send(MailMessage[] messages)

Send the specified message.

Parameters:

Parameter Type Description
messages com.aspose.email.MailMessage[] 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:

Parameter Type Description
messages MailMessageCollection The collection of messages.

send(Iterable messages)

public final void send(Iterable<MailMessage> messages)

Send the specified messages.

Parameters:

Parameter Type Description
messages java.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:

Parameter Type Description
connection IConnection Connection to a server
from java.lang.String A String that contains the address of message sender.
recipients java.lang.String A String that contains the address of recipients.
subject java.lang.String A subject of message.
body java.lang.String A body of message.

send(IConnection connection, MailMessage message)

public final void send(IConnection connection, MailMessage message)

Send the specified message.

Parameters:

Parameter Type Description
connection IConnection Connection to a server
message MailMessage The MailMessage that represents an email-message.

send(IConnection connection, MailMessage[] messages)

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

Send the specified message.

Parameters:

Parameter Type Description
connection IConnection Connection to a server
messages com.aspose.email.MailMessage[] 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:

Parameter Type Description
connection IConnection Connection to a server
messages MailMessageCollection The collection of messages.

send(IConnection connection, Iterable messages)

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

Send the specified messages.

Parameters:

Parameter Type Description
connection IConnection Connection to a server
messages java.lang.Iterable<com.aspose.email.MailMessage> The IEnumerator that supports a message iteration.

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:

Parameter Type Description
callback com.aspose.ms.System.AsyncCallback References 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:

Parameter Type Description
callback com.aspose.ms.System.AsyncCallback References a method to be called when a corresponding asynchronous operation completes.
state java.lang.Object The state.

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

endBeginSendQueue(System.IAsyncResult asyncResult)

public final void endBeginSendQueue(System.IAsyncResult asyncResult)

Waits for the pending asynchronous operation to complete.

Parameters:

Parameter Type Description
asyncResult com.aspose.ms.System.IAsyncResult The reference to the pending asynchronous request to wait for.

sendToQueue(Iterable messages)

public final void sendToQueue(Iterable<MailMessage> messages)

Append messages to queue

Parameters:

Parameter Type Description
messages java.lang.Iterable<com.aspose.email.MailMessage> MailMessages to send

beginValidateCredentials(IConnection connection)

public final System.IAsyncResult beginValidateCredentials(IConnection connection)

Begins to execute credentials validation

Parameters:

Parameter Type Description
connection IConnection Connection 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:

Parameter Type Description
connection IConnection Connection to a server
callback com.aspose.ms.System.AsyncCallback References 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:

Parameter Type Description
connection IConnection Connection to a server
callback com.aspose.ms.System.AsyncCallback References a method to be called when a corresponding asynchronous operation completes.
state java.lang.Object The 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(System.AsyncCallback callback)

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

Begins to execute credentials validation

Parameters:

Parameter Type Description
callback com.aspose.ms.System.AsyncCallback References 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:

Parameter Type Description
callback com.aspose.ms.System.AsyncCallback References a method to be called when a corresponding asynchronous operation completes.
state java.lang.Object The state.

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

endValidateCredentials(System.IAsyncResult asyncResult)

public final boolean endValidateCredentials(System.IAsyncResult asyncResult)

Waits for the pending asynchronous operation to complete.

Parameters:

Parameter Type Description
asyncResult com.aspose.ms.System.IAsyncResult The reference to the pending asynchronous request to wait for.

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

validateCredentials(IConnection connection)

public final boolean validateCredentials(IConnection connection)

Executes credentials validation

Parameters:

Parameter Type Description
connection IConnection Connection to a server

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

validateCredentials()

public boolean validateCredentials()

Executes credentials validation

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