public final class SmtpClient extends CredentialsByHostClient implements IMailTransferAgent
Allows applications to send messages by using the Simple Mail Transfer Protocol (SMTP).
OnConnect
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 iConnection,
String sender,
MailAddressCollection recipients,
MailMessage message)
Begins forward email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginForward(IConnection iConnection,
String sender,
MailAddressCollection recipients,
MailMessage message,
com.aspose.ms.System.AsyncCallback callback)
Begins forward email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginForward(IConnection iConnection,
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 iConnection,
String sender,
String recipient,
MailMessage message)
Begins forward email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginForward(IConnection iConnection,
String sender,
String recipient,
MailMessage message,
com.aspose.ms.System.AsyncCallback callback)
Begins forward email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginForward(IConnection iConnection,
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 iConnection)
Begins to execute 'No operation' command
|
com.aspose.ms.System.IAsyncResult |
beginNoop(IConnection iConnection,
com.aspose.ms.System.AsyncCallback callback)
Begins to execute 'No operation' command
|
com.aspose.ms.System.IAsyncResult |
beginNoop(IConnection iConnection,
com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins to execute 'No operation' command
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection iConnection,
Iterable<MailMessage> messages)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection iConnection,
Iterable<MailMessage> messages,
com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection iConnection,
Iterable<MailMessage> messages,
com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection iConnection,
Iterable<MailMessage> messages,
com.aspose.ms.System.EventHandler<MailMessageEventArgs> messageSentDelegate)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection iConnection,
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 iConnection,
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 iConnection,
MailMessage... messages)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection iConnection,
MailMessage message)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection iConnection,
MailMessage message,
com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection iConnection,
MailMessage message,
com.aspose.ms.System.AsyncCallback callback,
Object state)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection iConnection,
String from,
String recipients,
String subject,
String body)
Begins sending email asynchronously.
|
com.aspose.ms.System.IAsyncResult |
beginSend(IConnection iConnection,
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 iConnection,
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.
|
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 iConnection,
String sender,
MailAddressCollection recipients,
MailMessage message)
Forwards specified message to recipient
|
void |
forward(IConnection iConnection,
String sender,
MailAddressCollection recipients,
OutputStream messageStream)
Forwards specified message to recipient
|
void |
forward(IConnection iConnection,
String sender,
String recipient,
MailMessage message)
Forwards specified message to recipient
|
void |
forward(String sender,
MailAddressCollection recipients,
MailMessage message)
Forwards specified message to recipient
|
void |
forward(String sender,
MailAddressCollection recipients,
OutputStream messageStream)
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()
Gets or sets the encoding.
|
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.
|
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 iConnection)
'No operation' command
|
void |
send(IConnection iConnection,
Iterable<MailMessage> messages)
Send the specified messages.
|
void |
send(IConnection iConnection,
MailMessage... messages)
Send the specified message.
|
void |
send(IConnection iConnection,
MailMessage message)
Send the specified message.
|
void |
send(IConnection iConnection,
MailMessageCollection messages)
Send the specified message collection.
|
void |
send(IConnection iConnection,
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 |
setDeliveryMethod(int value)
Gets or sets the delivery method.
|
void |
setEncoding(Charset value)
Gets or sets the encoding.
|
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 |
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, createConnection, dispose, dispose, finalize, getAccessToken, getCapabilities, getConnectionCheckupPeriod, getConnectionState, getConnectionTimeout, getHost, getLogFileName, getPassword, getPort, getSecurityOptions, getSocksProxy, getTimeout, getTokenProvider, getUseAuthentication, getUseDateInLogFileName, getUsePipelining, getUsername, resetLogSettings, setAccessToken, setConnectionCheckupPeriod, setConnectionTimeout, setHost, setLogFileName, setPassword, setPort, setSecurityOptions, setSocksProxy, setTimeout, setTokenProvider, setUseAuthentication, setUseDateInLogFileName, 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 CredentialsByHostClient
public String getHelloMessage()
Gets or sets a HELO/EHLO string.
public void setHelloMessage(String value)
Gets or sets a HELO/EHLO string.
public int getDeliveryMethod()
Gets or sets the delivery method.
Value: An SmtpDeliveryMethod that indicates how messages are delivered.public void setDeliveryMethod(int value)
Gets or sets the delivery method.
Value: An SmtpDeliveryMethod that indicates how messages are delivered.public 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 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 Charset getEncoding()
Gets or sets the encoding.
Value: The encoding.Charset
object.public void setEncoding(Charset value)
Gets or sets the encoding.
Value: The encoding.value
- a Charset
object.public boolean getUseDefaultCredentials()
Gets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests.
getUseDefaultCredentials
in class CredentialsByHostClient
public void setUseDefaultCredentials(boolean value)
Gets or sets a Boolean value that controls whether the DefaultCredentials are sent with requests.
setUseDefaultCredentials
in class CredentialsByHostClient
value
- that controls whether the DefaultCredentials are sent with requestspublic 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 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 com.aspose.ms.System.IAsyncResult beginForward(IConnection iConnection, String sender, String recipient, MailMessage message)
Begins forward email asynchronously.
iConnection
- Connection to a serversender
- Sender of the forwarded message.recipient
- Recipient of the forwarded message.message
- The message for a forwarding.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginForward(IConnection iConnection, String sender, String recipient, MailMessage message, com.aspose.ms.System.AsyncCallback callback)
Begins forward email asynchronously.
iConnection
- 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.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginForward(IConnection iConnection, String sender, String recipient, MailMessage message, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins forward email asynchronously.
iConnection
- 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginForward(IConnection iConnection, String sender, MailAddressCollection recipients, MailMessage message)
Begins forward email asynchronously.
iConnection
- Connection to a serversender
- Sender of the forwarded message.recipients
- Recipients of the forwarded message.message
- The message for a forwarding.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginForward(IConnection iConnection, String sender, MailAddressCollection recipients, MailMessage message, com.aspose.ms.System.AsyncCallback callback)
Begins forward email asynchronously.
iConnection
- 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.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginForward(IConnection iConnection, String sender, MailAddressCollection recipients, MailMessage message, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins forward email asynchronously.
iConnection
- 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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 void forward(IConnection iConnection, String sender, String recipient, MailMessage message)
Forwards specified message to recipient
iConnection
- Connection to a serversender
- Sender of the forwarded message.recipient
- Recipient of the forwarded message.message
- The message for a forwarding.public void forward(IConnection iConnection, String sender, MailAddressCollection recipients, MailMessage message)
Forwards specified message to recipient
iConnection
- Connection to a serversender
- Sender of the forwarded message.recipients
- Recipients of the forwarded message.message
- The message for a forwarding.public 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 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 void forward(IConnection iConnection, String sender, MailAddressCollection recipients, OutputStream messageStream)
Forwards specified message to recipient
iConnection
- 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 void forward(String sender, MailAddressCollection recipients, OutputStream 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 com.aspose.ms.System.IAsyncResult beginNoop(IConnection iConnection)
Begins to execute 'No operation' command
iConnection
- Connection to a serverSystem.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginNoop(IConnection iConnection, com.aspose.ms.System.AsyncCallback callback)
Begins to execute 'No operation' command
iConnection
- Connection to a servercallback
- References a method to be called when a corresponding asynchronous operation completes.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginNoop(IConnection iConnection, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins to execute 'No operation' command
iConnection
- Connection to a servercallback
- References a method to be called when a corresponding asynchronous operation completes.state
- The state.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginNoop()
Begins to execute 'No operation' command
System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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 iConnection)
'No operation' command
iConnection
- Connection to a serverpublic void noop()
'No operation' command
noop
in class CredentialsByHostClient
public com.aspose.ms.System.IAsyncResult beginSend(IConnection iConnection, MailMessage message)
Begins sending email asynchronously.
iConnection
- Connection to a servermessage
- Represents an e-mail messageSystem.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginSend(IConnection iConnection, MailMessage message, com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
iConnection
- Connection to a servermessage
- Represents an e-mail messagecallback
- References a method to be called when a corresponding asynchronous operation completes.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginSend(IConnection iConnection, MailMessage message, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins sending email asynchronously.
iConnection
- Connection to a servermessage
- Represents an e-mail messagecallback
- References a method to be called when a corresponding asynchronous operation completes.state
- The state.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginSend(IConnection iConnection, String from, String recipients, String subject, String body)
Begins sending email asynchronously.
iConnection
- 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.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginSend(IConnection iConnection, String from, String recipients, String subject, String body, com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
iConnection
- 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.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginSend(IConnection iConnection, String from, String recipients, String subject, String body, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins sending email asynchronously.
iConnection
- 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.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginSend(IConnection iConnection, MailMessage... messages)
Begins sending email asynchronously.
iConnection
- Connection to a servermessages
- The array of MailMessage that represents an email-messages to send.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginSend(IConnection iConnection, Iterable<MailMessage> messages)
Begins sending email asynchronously.
iConnection
- Connection to a servermessages
- The array of MailMessage that represents an email-messages to send.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginSend(IConnection iConnection, Iterable<MailMessage> messages, com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
iConnection
- 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.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginSend(IConnection iConnection, Iterable<MailMessage> messages, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins sending email asynchronously.
iConnection
- 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.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginSend(MailMessage message)
Begins sending email asynchronously.
message
- Represents an e-mail messageSystem.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginSend(MailMessage... messages)
Begins sending email asynchronously.
messages
- The array of MailMessage that represents an email-messages to send.System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginSend(IConnection iConnection, Iterable<MailMessage> messages, com.aspose.ms.System.EventHandler<MailMessageEventArgs> messageSentDelegate)
Begins sending email asynchronously.
iConnection
- 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.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginSend(IConnection iConnection, Iterable<MailMessage> messages, com.aspose.ms.System.EventHandler<MailMessageEventArgs> messageSentDelegate, com.aspose.ms.System.AsyncCallback callback)
Begins sending email asynchronously.
iConnection
- 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.System.IAsyncResult
that represents the status of an asynchronous operation.public com.aspose.ms.System.IAsyncResult beginSend(IConnection iConnection, Iterable<MailMessage> messages, com.aspose.ms.System.EventHandler<MailMessageEventArgs> messageSentDelegate, com.aspose.ms.System.AsyncCallback callback, Object state)
Begins sending email asynchronously.
iConnection
- 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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.System.IAsyncResult
that represents the status of an asynchronous operation.public 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 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 void send(MailMessage message)
Send the specified message.
send
in interface IMailTransferAgent
message
- The MailMessage that represents an email-message.public void send(MailMessage... messages)
Send the specified message.
messages
- The array of MailMessage that represents an email-messages to send.public void send(MailMessageCollection messages)
Send the specified message collection.
messages
- The collection of messages.public void send(Iterable<MailMessage> messages)
Send the specified messages.
messages
- The IEnumerator that supports a message iteration.public void send(IConnection iConnection, String from, String recipients, String subject, String body)
Creates and sends the specified message.
iConnection
- 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 void send(IConnection iConnection, MailMessage message)
Send the specified message.
iConnection
- Connection to a servermessage
- The MailMessage that represents an email-message.public void send(IConnection iConnection, MailMessage... messages)
Send the specified message.
iConnection
- Connection to a servermessages
- The array of MailMessage that represents an email-messages to send.public void send(IConnection iConnection, MailMessageCollection messages)
Send the specified message collection.
iConnection
- Connection to a servermessages
- The collection of messages.public void send(IConnection iConnection, Iterable<MailMessage> messages)
Send the specified messages.
iConnection
- Connection to a servermessages
- The IEnumerator that supports a message iteration.Copyright (c) 2008-2018 Aspose Pty Ltd. All Rights Reserved.