public final class SmtpClient extends CredentialsByHostClient implements IMailTransferAgent
Allows applications to send messages by using the Simple Mail Transfer Protocol (SMTP).
Constructor and Description |
---|
SmtpClient()
Initializes a new instance of the
SmtpClient class. |
SmtpClient(String host)
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,
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. |
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 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,
int port,
String username,
String password,
int securityOptions)
Initializes a new instance of the
SmtpClient class. |
SmtpClient(String host,
short 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,
String username,
String password)
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,
String username,
String password,
int securityOptions)
Initializes a new instance of the
SmtpClient class. |
Modifier and Type | Method and Description |
---|---|
com.aspose.ms.System.IAsyncResult |
beginForward(IConnection connection,
String sender,
MailAddressCollection recipients,
MailMessage message)
Begins forward email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginForward(IConnection connection,
String sender,
MailAddressCollection recipients,
MailMessage message,
com.aspose.ms.System.AsyncCallback callback)
Begins forward email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginForward(IConnection connection,
String sender,
MailAddressCollection recipients,
MailMessage message,
com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins forward email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginForward(IConnection connection,
String sender,
String recipient,
MailMessage message)
Begins forward email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginForward(IConnection connection,
String sender,
String recipient,
MailMessage message,
com.aspose.ms.System.AsyncCallback callback)
Begins forward email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginForward(IConnection connection,
String sender,
String recipient,
MailMessage message,
com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins forward email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginForward(String sender,
MailAddressCollection recipients,
MailMessage message)
Begins forward email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginForward(String sender,
MailAddressCollection recipients,
MailMessage message,
com.aspose.ms.System.AsyncCallback callback)
Begins forward email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginForward(String sender,
MailAddressCollection recipients,
MailMessage message,
com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins forward email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginForward(String sender,
String recipient,
MailMessage message)
Begins forward email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginForward(String sender,
String recipient,
MailMessage message,
com.aspose.ms.System.AsyncCallback callback)
Begins forward email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginForward(String sender,
String recipient,
MailMessage message,
com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins forward email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginNoop()
Begins to execute 'No operation' command
|
com.aspose.ms.System.IAsyncResult |
beginNoop(com.aspose.ms.System.AsyncCallback callback)
Begins to execute 'No operation' command
|
com.aspose.ms.System.IAsyncResult |
beginNoop(com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins to execute 'No operation' command
|
com.aspose.ms.System.IAsyncResult |
beginNoop(IConnection connection)
Begins to execute 'No operation' command
|
com.aspose.ms.System.IAsyncResult |
beginNoop(IConnection connection,
com.aspose.ms.System.AsyncCallback callback)
Begins to execute 'No operation' command
|
com.aspose.ms.System.IAsyncResult |
beginNoop(IConnection connection,
com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins to execute 'No operation' command
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection connection,
Iterable<MailMessage> messages)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection connection,
Iterable<MailMessage> messages,
com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection connection,
Iterable<MailMessage> messages,
com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection connection,
Iterable<MailMessage> messages,
com.aspose.ms.System.EventHandler<MailMessageEventArgs> messageSentDelegate)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection connection,
Iterable<MailMessage> messages,
com.aspose.ms.System.EventHandler<MailMessageEventArgs> messageSentDelegate,
com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection connection,
Iterable<MailMessage> messages,
com.aspose.ms.System.EventHandler<MailMessageEventArgs> messageSentDelegate,
com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection connection,
MailMessage... messages)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection connection,
MailMessage message)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection connection,
MailMessage message,
com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection connection,
MailMessage message,
com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection connection,
String from,
String recipients,
String subject,
String body)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection connection,
String from,
String recipients,
String subject,
String body,
com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection connection,
String from,
String recipients,
String subject,
String body,
com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(Iterable<MailMessage> messages)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(Iterable<MailMessage> messages,
com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(Iterable<MailMessage> messages,
com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(Iterable<MailMessage> messages,
com.aspose.ms.System.EventHandler<MailMessageEventArgs> messageSentDelegate)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(Iterable<MailMessage> messages,
com.aspose.ms.System.EventHandler<MailMessageEventArgs> messageSentDelegate,
com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(Iterable<MailMessage> messages,
com.aspose.ms.System.EventHandler<MailMessageEventArgs> messageSentDelegate,
com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(MailMessage... messages)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(MailMessage message)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(MailMessage message,
com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(MailMessage message,
com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(String from,
String recipients,
String subject,
String body)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(String from,
String recipients,
String subject,
String body,
com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(String from,
String recipients,
String subject,
String body,
com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSendQueue()
Begins to execute 'No operation' command
|
com.aspose.ms.System.IAsyncResult |
beginSendQueue(com.aspose.ms.System.AsyncCallback callback)
Begins to execute 'No operation' command
|
com.aspose.ms.System.IAsyncResult |
beginSendQueue(com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins to execute 'No operation' command
|
void |
endBeginSendQueue(com.aspose.ms.System.IAsyncResult asyncResult)
Waits for the pending asynchronous operation to complete.
|
void |
endForward(com.aspose.ms.System.IAsyncResult asyncResult)
Waits for the asynchronous operation to complete.
|
void |
endNoop(com.aspose.ms.System.IAsyncResult asyncResult)
Waits for the pending asynchronous operation to complete.
|
void |
endSend(com.aspose.ms.System.IAsyncResult asyncResult)
Waits for the asynchronous operation to complete.
|
void |
forward(IConnection connection,
String sender,
MailAddressCollection recipients,
InputStream messageStream)
Forwards specified message to recipient
|
void |
forward(IConnection connection,
String sender,
MailAddressCollection recipients,
MailMessage message)
Forwards specified message to recipient
|
void |
forward(IConnection connection,
String sender,
String recipient,
MailMessage message)
Forwards specified message to recipient
|
void |
forward(String sender,
MailAddressCollection recipients,
InputStream messageStream)
Forwards specified message to recipient
|
void |
forward(String sender,
MailAddressCollection recipients,
MailMessage message)
Forwards specified message to recipient
|
void |
forward(String sender,
String recipient,
MailMessage message)
Forwards specified message to recipient
|
int |
getDefaultPort()
Gets default port for client
|
int |
getDeliveryMethod()
Gets or sets the delivery method.
|
Charset |
getEncoding()
Deprecated.
|
String |
getHelloMessage()
Gets or sets a HELO/EHLO string.
|
String |
getPickupDirectoryLocation()
Gets or sets the directory where applications save mail messages to be processed by the local SMTP server.
|
String |
getSmtpQueueLocation()
Gets or sets the directory where applications save mail messages to be processed by sending in SMTP queue.
|
boolean |
getUseDefaultCredentials()
Gets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests.
|
boolean |
getUseTnef()
Gets or sets a boolean value that controls whether the messages are sent in TNEF format.
|
void |
noop()
'No operation' command
|
void |
noop(IConnection connection)
'No operation' command
|
void |
send(IConnection connection,
Iterable<MailMessage> messages)
Send the specified messages.
|
void |
send(IConnection connection,
MailMessage... messages)
Send the specified message.
|
void |
send(IConnection connection,
MailMessage message)
Send the specified message.
|
void |
send(IConnection connection,
MailMessageCollection messages)
Send the specified message collection.
|
void |
send(IConnection connection,
String from,
String recipients,
String subject,
String body)
Creates and sends the specified message.
|
void |
send(Iterable<MailMessage> messages)
Send the specified messages.
|
void |
send(MailMessage... messages)
Send the specified message.
|
void |
send(MailMessage message)
Send the specified message.
|
void |
send(MailMessageCollection messages)
Send the specified message collection.
|
void |
send(String from,
String recipients,
String subject,
String body)
Creates and sends the specified message.
|
void |
sendToQueue(Iterable<MailMessage> messages)
Append messages to queue
|
void |
setDeliveryMethod(int value)
Gets or sets the delivery method.
|
void |
setEncoding(Charset value)
Deprecated.
|
void |
setFailedQueueSending(com.aspose.ms.System.EventHandler<MailMessageEventArgs> handler)
Adds or removes subscriber for notifications about failed sending operations in smtp queue
|
void |
setHelloMessage(String value)
Gets or sets a HELO/EHLO string.
|
void |
setPickupDirectoryLocation(String value)
Gets or sets the directory where applications save mail messages to be processed by the local SMTP server.
|
void |
setSmtpQueueLocation(String value)
Gets or sets the directory where applications save mail messages to be processed by sending in SMTP queue.
|
void |
setSucceededQueueSending(com.aspose.ms.System.EventHandler<MailMessageEventArgs> handler)
Adds or removes subscriber for notifications about succeeded sending operations in smtp queue
|
void |
setUseDefaultCredentials(boolean value)
Gets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests.
|
void |
setUseTnef(boolean value)
Gets or sets a boolean value that controls whether the messages are sent in TNEF format.
|
bindIPEndPoint, cancelAsyncOperation, connectIPEndPoint, createConnection, createConnection, dispose, dispose, finalize, getAccessToken, getCapabilities, getClientCertificates, getConnectionAsgmtMode, getConnectionCheckupPeriod, getConnectionsQuantity, getConnectionState, getCurrentConnection, getEnableLogger, getHost, getLogFileName, getPassword, getPort, getProxy, getSecurityOptions, getSupportedEncryption, getTimeout, getTokenProvider, getUseAuthentication, getUseDateInLogFileName, getUseMultiConnection, getUseMultyConnection, getUsePipelining, getUsername, resetLogSettings, setAccessToken, setConnectionAsgmtMode, setConnectionCheckupPeriod, setConnectionsQuantity, setEnableLogger, setHost, setLogFileName, setPassword, setPort, setProxy, setSecurityOptions, setSocketsLayerVersion2, setSocketsLayerVersion2DisableSSLCertificateValidation, setSupportedEncryption, setTimeout, setTokenProvider, setUseAuthentication, setUseDateInLogFileName, setUseMultiConnection, setUseMultyConnection, setUsePipelining, setUsername
public SmtpClient()
Initializes a new instance of the SmtpClient
class.
public SmtpClient(String host)
Initializes a new instance of the SmtpClient
class.
host
- The name of the host used for SMTP.public SmtpClient(String host, short securityOptions)
Initializes a new instance of the SmtpClient
class.
host
- The name of the host used for SMTP.securityOptions
- Security mode for a mail clientpublic SmtpClient(String host, int port)
Initializes a new instance of the SmtpClient
class.
host
- The name of the host used for SMTP.port
- The port used for SMTP.public SmtpClient(String host, int port, int securityOptions)
Initializes a new instance of the SmtpClient
class.
host
- The name of the host used for SMTP.port
- The port used for SMTP.securityOptions
- Security mode for a mail clientpublic SmtpClient(String host, String username, String password)
Initializes a new instance of the SmtpClient
class.
host
- The name of the host used for SMTP.username
- The username.password
- The password.public SmtpClient(String host, String username, String password, int securityOptions)
Initializes a new instance of the SmtpClient
class.
host
- The name of the host used for SMTP.username
- The username.password
- The password.securityOptions
- Security mode for a mail clientpublic SmtpClient(String host, int port, String username, String password)
Initializes a new instance of the SmtpClient
class.
host
- The name of the host used for SMTP.port
- The port used for SMTP.username
- The username.password
- The password.public SmtpClient(String host, int port, String username, String password, int securityOptions)
Initializes a new instance of the SmtpClient
class.
host
- The name of the host used for SMTP.port
- The port used for SMTP.username
- The username.password
- The password.securityOptions
- Security mode for a mail clientpublic SmtpClient(String host, String username, String authInfo, boolean useOAuth)
Initializes a new instance of the SmtpClient
class.
host
- The name of the host used for SMTP.username
- The username.authInfo
- The user password or XOAUTH2 access tokenuseOAuth
- Defines whether SASL XOAUTH2 mechanism is used to login to the serverpublic SmtpClient(String host, String username, String authInfo, boolean useOAuth, int securityOptions)
Initializes a new instance of the SmtpClient
class.
host
- The name of the host used for SMTP.username
- The username.authInfo
- The user password or XOAUTH2 access tokenuseOAuth
- Defines whether SASL XOAUTH2 mechanism is used to login to the serversecurityOptions
- Security mode for a mail clientpublic SmtpClient(String host, int port, String username, String authInfo, boolean useOAuth)
Initializes a new instance of the SmtpClient
class.
host
- The name of the host used for SMTP.port
- The port used for SMTP.username
- The username.authInfo
- The user password or XOAUTH2 access tokenuseOAuth
- Defines whether SASL XOAUTH2 mechanism is used to login to the serverpublic SmtpClient(String host, int port, String username, String authInfo, boolean useOAuth, int securityOptions)
Initializes a new instance of the SmtpClient
class.
host
- The name of the host used for SMTP.port
- The port used for SMTP.username
- The username.authInfo
- The user password or XOAUTH2 access tokenuseOAuth
- Defines whether SASL XOAUTH2 mechanism is used to login to the serversecurityOptions
- Security mode for a mail clientpublic SmtpClient(String host, String username, ITokenProvider tokenProvider)
Initializes a new instance of the SmtpClient
class.
host
- The name of the host used for SMTP.username
- The username.tokenProvider
- TokenProvider allowing to retrieve access token.public SmtpClient(String host, String username, ITokenProvider tokenProvider, int securityOptions)
Initializes a new instance of the SmtpClient
class.
host
- The name of the host used for SMTP.username
- The username.tokenProvider
- TokenProvider allowing to retrieve access token.securityOptions
- Security mode for a mail clientpublic SmtpClient(String host, int port, String username, ITokenProvider tokenProvider)
Initializes a new instance of the SmtpClient
class.
host
- The name of the host used for SMTP.port
- The port used for SMTP.username
- The username.tokenProvider
- TokenProvider allowing to retrieve access token.public SmtpClient(String host, int port, String username, ITokenProvider tokenProvider, int securityOptions)
Initializes a new instance of the SmtpClient
class.
host
- The name of the host used for SMTP.port
- The port used for SMTP.username
- The username.tokenProvider
- TokenProvider allowing to retrieve access token.securityOptions
- Security mode for a mail clientpublic int getDefaultPort()
Gets default port for client
getDefaultPort
in class EmailClient
public final String getHelloMessage()
Gets or sets a HELO/EHLO string.
public final void setHelloMessage(String value)
Gets or sets a HELO/EHLO string.
public final int getDeliveryMethod()
Gets or sets the delivery method.
Value: An SmtpDeliveryMethod that indicates how messages are delivered.public final void setDeliveryMethod(int value)
Gets or sets the delivery method.
Value: An SmtpDeliveryMethod that indicates how messages are delivered.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 directorypublic 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 directorypublic 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 directorypublic 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 directorypublic void setFailedQueueSending(com.aspose.ms.System.EventHandler<MailMessageEventArgs> handler)
Adds or removes subscriber for notifications about failed sending operations in smtp queue
public void setSucceededQueueSending(com.aspose.ms.System.EventHandler<MailMessageEventArgs> handler)
Adds or removes subscriber for notifications about succeeded sending operations in smtp queue
@Deprecated public final Charset getEncoding()
Gets or sets the encoding.
Value: The encoding.@Deprecated public final void setEncoding(Charset value)
Gets or sets the encoding.
Value: The encoding.public boolean getUseDefaultCredentials()
Gets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests.
getUseDefaultCredentials
in class EmailClient
public void setUseDefaultCredentials(boolean value)
Gets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests.
setUseDefaultCredentials
in class EmailClient
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.
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.
public final com.aspose.ms.System.IAsyncResult beginForward(IConnection connection, String sender, String recipient, MailMessage message)
Begins forward email asynchronously.
connection
- Connection to a serversender
- Sender of the forwarded message.recipient
- Recipient of the forwarded message.message
- The message for a forwarding.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginForward(IConnection connection, String sender, String recipient, MailMessage message, com.aspose.ms.System.AsyncCallback callback)
Begins forward email asynchronously.
connection
- Connection to a serversender
- Sender of the forwarded message.recipient
- Recipients of the forwarded message.message
- The message for a forwarding.callback
- References a method to be called when a corresponding asynchronous operation completes.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginForward(IConnection connection, String sender, String recipient, MailMessage message, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins forward email asynchronously.
connection
- Connection to a serversender
- Sender of the forwarded message.recipient
- Recipients of the forwarded message.message
- The message for a forwarding.callback
- References a method to be called when a corresponding asynchronous operation completes.state
- The state.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginForward(String sender, String recipient, MailMessage message)
Begins forward email asynchronously.
sender
- Sender of the forwarded message.recipient
- Recipients of the forwarded message.message
- The message for a forwarding.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginForward(String sender, String recipient, MailMessage message, com.aspose.ms.System.AsyncCallback callback)
Begins forward email asynchronously.
sender
- Sender of the forwarded message.recipient
- Recipients of the forwarded message.message
- The message for a forwarding.callback
- References a method to be called when a corresponding asynchronous operation completes.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginForward(String sender, String recipient, MailMessage message, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins forward email asynchronously.
sender
- Sender of the forwarded message.recipient
- Recipients of the forwarded message.message
- The message for a forwarding.callback
- References a method to be called when a corresponding asynchronous operation completes.state
- The state.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginForward(IConnection connection, String sender, MailAddressCollection recipients, MailMessage message)
Begins forward email asynchronously.
connection
- Connection to a serversender
- Sender of the forwarded message.recipients
- Recipients of the forwarded message.message
- The message for a forwarding.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginForward(IConnection connection, String sender, MailAddressCollection recipients, MailMessage message, com.aspose.ms.System.AsyncCallback callback)
Begins forward email asynchronously.
connection
- Connection to a serversender
- Sender of the forwarded message.recipients
- Recipients of the forwarded message.message
- The message for a forwarding.callback
- References a method to be called when a corresponding asynchronous operation completes.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginForward(IConnection connection, String sender, MailAddressCollection recipients, MailMessage message, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins forward email asynchronously.
connection
- Connection to a serversender
- Sender of the forwarded message.recipients
- Recipients of the forwarded message.message
- The message for a forwarding.callback
- References a method to be called when a corresponding asynchronous operation completes.state
- The state.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginForward(String sender, MailAddressCollection recipients, MailMessage message)
Begins forward email asynchronously.
sender
- Sender of the forwarded message.recipients
- Recipients of the forwarded message.message
- The message for a forwarding.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginForward(String sender, MailAddressCollection recipients, MailMessage message, com.aspose.ms.System.AsyncCallback callback)
Begins forward email asynchronously.
sender
- Sender of the forwarded message.recipients
- Recipients of the forwarded message.message
- The message for a forwarding.callback
- References a method to be called when a corresponding asynchronous operation completes.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginForward(String sender, MailAddressCollection recipients, MailMessage message, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins forward email asynchronously.
sender
- Sender of the forwarded message.recipients
- Recipients of the forwarded message.message
- The message for a forwarding.callback
- References a method to be called when a corresponding asynchronous operation completes.state
- The state.IAsyncResult
that represents the status of an asynchronous operation.public final void endForward(com.aspose.ms.System.IAsyncResult asyncResult)
Waits for the asynchronous operation to complete.
asyncResult
- The reference to the pending asynchronous request to wait for.public final void forward(IConnection connection, String sender, String recipient, MailMessage message)
Forwards specified message to recipient
connection
- Connection to a serversender
- Sender of the forwarded message.recipient
- Recipient of the forwarded message.message
- The message for a forwarding.public final void forward(IConnection connection, String sender, MailAddressCollection recipients, MailMessage message)
Forwards specified message to recipient
connection
- Connection to a serversender
- Sender of the forwarded message.recipients
- Recipients of the forwarded message.message
- The message for a forwarding.public final void forward(String sender, String recipient, MailMessage message)
Forwards specified message to recipient
sender
- Sender of the forwarded message.recipient
- Recipient of the forwarded message.message
- The message for a forwarding.public final void forward(String sender, MailAddressCollection recipients, MailMessage message)
Forwards specified message to recipient
sender
- Sender of the forwarded message.recipients
- Recipients of the forwarded message.message
- The message for a forwarding.public final void forward(IConnection connection, String sender, MailAddressCollection recipients, InputStream messageStream)
Forwards specified message to recipient
connection
- Connection to a serversender
- Sender of the forwarded message.recipients
- Recipients of the forwarded message.messageStream
- The stream that represents message in eml format.public final void forward(String sender, MailAddressCollection recipients, InputStream messageStream)
Forwards specified message to recipient
sender
- Sender of the forwarded message.recipients
- Recipients of the forwarded message.messageStream
- The stream that represents message in eml format.public final com.aspose.ms.System.IAsyncResult beginNoop(IConnection connection)
Begins to execute 'No operation' command
connection
- Connection to a serverIAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginNoop(IConnection connection, com.aspose.ms.System.AsyncCallback callback)
Begins to execute 'No operation' command
connection
- Connection to a servercallback
- References a method to be called when a corresponding asynchronous operation completes.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginNoop(IConnection connection, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins to execute 'No operation' command
connection
- Connection to a servercallback
- References a method to be called when a corresponding asynchronous operation completes.state
- The state.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginNoop()
Begins to execute 'No operation' command
IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginNoop(com.aspose.ms.System.AsyncCallback callback)
Begins to execute 'No operation' command
callback
- References a method to be called when a corresponding asynchronous operation completes.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginNoop(com.aspose.ms.System.AsyncCallback callback, Object state)
Begins to execute 'No operation' command
callback
- References a method to be called when a corresponding asynchronous operation completes.state
- The state.IAsyncResult
that represents the status of an asynchronous operation.public final void endNoop(com.aspose.ms.System.IAsyncResult asyncResult)
Waits for the pending asynchronous operation to complete.
asyncResult
- The reference to the pending asynchronous request to wait for.public void noop(IConnection connection)
'No operation' command
noop
in class EmailClient
connection
- Connection to a serverpublic void noop()
'No operation' command
noop
in class EmailClient
public final com.aspose.ms.System.IAsyncResult beginSend(IConnection connection, MailMessage message)
Begins sending email asynchronously.
connection
- Connection to a servermessage
- Represents an e-mail messageIAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(IConnection connection, MailMessage message, com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
connection
- Connection to a servermessage
- Represents an e-mail messagecallback
- References a method to be called when a corresponding asynchronous operation completes.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(IConnection connection, MailMessage message, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins sending email asynchronously.
connection
- Connection to a servermessage
- Represents an e-mail messagecallback
- References a method to be called when a corresponding asynchronous operation completes.state
- The state.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(IConnection connection, String from, String recipients, String subject, String body)
Begins sending email asynchronously.
connection
- Connection to a serverfrom
- A String that contains the address of message sender.recipients
- A String that contains the address of recipients.subject
- A subject of message.body
- A body of message.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(IConnection connection, String from, String recipients, String subject, String body, com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
connection
- Connection to a serverfrom
- A String that contains the address of message sender.recipients
- A String that contains the address of recipients.subject
- A subject of message.body
- A body of message.callback
- References a method to be called when a corresponding asynchronous operation completes.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(IConnection connection, String from, String recipients, String subject, String body, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins sending email asynchronously.
connection
- Connection to a serverfrom
- A String that contains the address of message sender.recipients
- A String that contains the address of recipients.subject
- A subject of message.body
- A body of message.callback
- References a method to be called when a corresponding asynchronous operation completes.state
- The state.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(IConnection connection, MailMessage... messages)
Begins sending email asynchronously.
connection
- Connection to a servermessages
- The array of MailMessage that represents an email-messages to send.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(IConnection connection, Iterable<MailMessage> messages)
Begins sending email asynchronously.
connection
- Connection to a servermessages
- The array of MailMessage that represents an email-messages to send.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(IConnection connection, Iterable<MailMessage> messages, com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
connection
- Connection to a servermessages
- The array of MailMessage that represents an email-messages to send.callback
- References a method to be called when a corresponding asynchronous operation completes.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(IConnection connection, Iterable<MailMessage> messages, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins sending email asynchronously.
connection
- Connection to a servermessages
- The array of MailMessage that represents an email-messages to send.callback
- References a method to be called when a corresponding asynchronous operation completes.state
- The state.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(MailMessage message)
Begins sending email asynchronously.
message
- Represents an e-mail messageIAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(MailMessage message, com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
message
- Represents an e-mail messagecallback
- References a method to be called when a corresponding asynchronous operation completes.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(MailMessage message, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins sending email asynchronously.
message
- Represents an e-mail messagecallback
- References a method to be called when a corresponding asynchronous operation completes.state
- The state.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(String from, String recipients, String subject, String body)
Begins sending email asynchronously.
from
- A String that contains the address of message sender.recipients
- A String that contains the address of recipients.subject
- A subject of message.body
- A body of message.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(String from, String recipients, String subject, String body, com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
from
- A String that contains the address of message sender.recipients
- A String that contains the address of recipients.subject
- A subject of message.body
- A body of message.callback
- References a method to be called when a corresponding asynchronous operation completes.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(String from, String recipients, String subject, String body, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins sending email asynchronously.
from
- A String that contains the address of message sender.recipients
- A String that contains the address of recipients.subject
- A subject of message.body
- A body of message.callback
- References a method to be called when a corresponding asynchronous operation completes.state
- The state.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(MailMessage... messages)
Begins sending email asynchronously.
messages
- The array of MailMessage that represents an email-messages to send.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(Iterable<MailMessage> messages)
Begins sending email asynchronously.
messages
- The array of MailMessage that represents an email-messages to send.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(Iterable<MailMessage> messages, com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
messages
- The array of MailMessage that represents an email-messages to send.callback
- References a method to be called when a corresponding asynchronous operation completes.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(Iterable<MailMessage> messages, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins sending email asynchronously.
messages
- The array of MailMessage that represents an email-messages to send.callback
- References a method to be called when a corresponding asynchronous operation completes.state
- The state.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(IConnection connection, Iterable<MailMessage> messages, com.aspose.ms.System.EventHandler<MailMessageEventArgs> messageSentDelegate)
Begins sending email asynchronously.
connection
- Connection to a servermessages
- The array of MailMessage that represents an email-messages to send.messageSentDelegate
- References a method to be called when a message has been sent.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(IConnection connection, Iterable<MailMessage> messages, com.aspose.ms.System.EventHandler<MailMessageEventArgs> messageSentDelegate, com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
connection
- Connection to a servermessages
- The array of MailMessage that represents an email-messages to send.messageSentDelegate
- References a method to be called when a message has been sent.callback
- References a method to be called when a corresponding asynchronous operation completes.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(IConnection connection, Iterable<MailMessage> messages, com.aspose.ms.System.EventHandler<MailMessageEventArgs> messageSentDelegate, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins sending email asynchronously.
connection
- Connection to a servermessages
- The array of MailMessage that represents an email-messages to send.messageSentDelegate
- References a method to be called when a message has been sent.callback
- References a method to be called when a corresponding asynchronous operation completes.state
- The state.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(Iterable<MailMessage> messages, com.aspose.ms.System.EventHandler<MailMessageEventArgs> messageSentDelegate)
Begins sending email asynchronously.
messages
- The array of MailMessage that represents an email-messages to send.messageSentDelegate
- References a method to be called when a message has been sent.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(Iterable<MailMessage> messages, com.aspose.ms.System.EventHandler<MailMessageEventArgs> messageSentDelegate, com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
messages
- The array of MailMessage that represents an email-messages to send.messageSentDelegate
- References a method to be called when a message has been sent.callback
- References a method to be called when a corresponding asynchronous operation completes.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSend(Iterable<MailMessage> messages, com.aspose.ms.System.EventHandler<MailMessageEventArgs> messageSentDelegate, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins sending email asynchronously.
messages
- The array of MailMessage that represents an email-messages to send.messageSentDelegate
- References a method to be called when a message has been sent.callback
- References a method to be called when a corresponding asynchronous operation completes.state
- The state.IAsyncResult
that represents the status of an asynchronous operation.public final void endSend(com.aspose.ms.System.IAsyncResult asyncResult)
Waits for the asynchronous operation to complete.
asyncResult
- The reference to the pending asynchronous request to wait for.public final void send(String from, String recipients, String subject, String body)
Creates and sends the specified message.
from
- A String that contains the address of message sender.recipients
- A String that contains the address of recipients.subject
- A subject of message.body
- A body of message.public final void send(MailMessage message)
Send the specified message.
send
in interface IMailTransferAgent
message
- The MailMessage that represents an email-message.public final void send(MailMessage... messages)
Send the specified message.
messages
- The array of MailMessage that represents an email-messages to send.public final void send(MailMessageCollection messages)
Send the specified message collection.
messages
- The collection of messages.public final void send(Iterable<MailMessage> messages)
Send the specified messages.
messages
- The IEnumerator that supports a message iteration.public final void send(IConnection connection, String from, String recipients, String subject, String body)
Creates and sends the specified message.
connection
- Connection to a serverfrom
- A String that contains the address of message sender.recipients
- A String that contains the address of recipients.subject
- A subject of message.body
- A body of message.public final void send(IConnection connection, MailMessage message)
Send the specified message.
connection
- Connection to a servermessage
- The MailMessage that represents an email-message.public final void send(IConnection connection, MailMessage... messages)
Send the specified message.
connection
- Connection to a servermessages
- The array of MailMessage that represents an email-messages to send.public final void send(IConnection connection, MailMessageCollection messages)
Send the specified message collection.
connection
- Connection to a servermessages
- The collection of messages.public final void send(IConnection connection, Iterable<MailMessage> messages)
Send the specified messages.
connection
- Connection to a servermessages
- The IEnumerator that supports a message iteration.public final com.aspose.ms.System.IAsyncResult beginSendQueue()
Begins to execute 'No operation' command
IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSendQueue(com.aspose.ms.System.AsyncCallback callback)
Begins to execute 'No operation' command
callback
- References a method to be called when a corresponding asynchronous operation completes.IAsyncResult
that represents the status of an asynchronous operation.public final com.aspose.ms.System.IAsyncResult beginSendQueue(com.aspose.ms.System.AsyncCallback callback, Object state)
Begins to execute 'No operation' command
callback
- References a method to be called when a corresponding asynchronous operation completes.state
- The state.IAsyncResult
that represents the status of an asynchronous operation.public final void endBeginSendQueue(com.aspose.ms.System.IAsyncResult asyncResult)
Waits for the pending asynchronous operation to complete.
asyncResult
- The reference to the pending asynchronous request to wait for.public final void sendToQueue(Iterable<MailMessage> messages)
Append messages to queue
messages
- MailMessages to send