@Deprecated public class SmtpClientBulkSendAgent extends Object implements com.aspose.ms.System.IDisposable
Represents a multi-threading agent for E-mail delivery using SmtpClient.
Modifier and Type | Field and Description |
---|---|
com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler> |
BulkSendCompleted
Deprecated.
Occurs when bulk send operation is completed.
|
com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler> |
LastMessageSending
Deprecated.
Occurs if the the last message in MessagePool send is begining.
|
com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler> |
MessageSending
Deprecated.
Occurs if the message is started to send.
|
com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler> |
MessageSent
Deprecated.
Occurs if the message has been sent.
|
Constructor and Description |
---|
SmtpClientBulkSendAgent(SmtpClient client)
Deprecated.
Initialize an instance of SmtpclientBulkSendAgent class with specified SmtpClient.
|
SmtpClientBulkSendAgent(SmtpClient client,
int concurrent)
Deprecated.
Initialize an instance of SmtpclientBulkSendAgent class with specified SmtpClient.
|
Modifier and Type | Method and Description |
---|---|
void |
addMessage(MailMessage message)
Deprecated.
Add messages to Message Pool.
|
void |
addMessages(MailMessageCollection messages)
Deprecated.
Add messages to Message Pool.
|
void |
clearMessages()
Deprecated.
Clear the Email messages in the Message Pool.
|
void |
dispose()
Deprecated.
Releases the unmanaged resources used by the SmtpClientBulkSendAgent.
|
protected void |
dispose(boolean disposing)
Deprecated.
Releases the unmanaged resources used by the SmtpClientBulkSendAgent, and optionally disposes of the managed resources.
|
protected void |
doSendMailMessage(Object state)
Deprecated.
Do email message sending in each thread.
|
int |
getActiveThreads()
Deprecated.
Gets the number of active threads.
|
SmtpClient |
getClient()
Deprecated.
Gets or sets the smtpclient.
|
int |
getDeliveryInterval()
Deprecated.
Gets the interval of mail message delivery.
|
MailMessageCollection |
getFailedDeliveryMessages()
Deprecated.
Gets the failed delivery Email messages.
|
List |
getInnerExceptions()
Deprecated.
Gets the exception list.
|
MailMessageCollection |
getMessagePool()
Deprecated.
Gets the message pool.
|
int |
getTotalFailed()
Deprecated.
Gets the number of total failed Email messages.
|
int |
getTotalProcessed()
Deprecated.
Gets the number of total processed Email messages.
|
int |
getTotalQueued()
Deprecated.
Gets the number of total queued Email messages.
|
int |
getTotalSent()
Deprecated.
Gets the number of total sent Email messages.
|
void |
setDeliveryInterval(int value)
Deprecated.
Gets the interval of mail message delivery.
|
void |
start()
Deprecated.
Start the Bulk send.
|
void |
stop()
Deprecated.
Stop the bulk sending.
|
void |
waitForIdle()
Deprecated.
Wait for the thread pool to be idle
|
public final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler> LastMessageSending
Occurs if the the last message in MessagePool send is begining.
public final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler> MessageSending
Occurs if the message is started to send.
public final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler> MessageSent
Occurs if the message has been sent.
public final com.aspose.ms.lang.Event<com.aspose.ms.System.EventHandler> BulkSendCompleted
Occurs when bulk send operation is completed.
public SmtpClientBulkSendAgent(SmtpClient client)
Initialize an instance of SmtpclientBulkSendAgent class with specified SmtpClient.
client
- The SmtpClient settings used to send E-mail messages.public SmtpClientBulkSendAgent(SmtpClient client, int concurrent)
Initialize an instance of SmtpclientBulkSendAgent class with specified SmtpClient.
client
- The SmtpClient settings used to send E-mail messages.concurrent
- The concurrent threads number.public MailMessageCollection getFailedDeliveryMessages()
Gets the failed delivery Email messages.
MailMessageCollection
object.public MailMessageCollection getMessagePool()
Gets the message pool.
MailMessageCollection
object.public int getActiveThreads()
Gets the number of active threads.
public int getTotalSent()
Gets the number of total sent Email messages.
public int getTotalFailed()
Gets the number of total failed Email messages.
public int getTotalQueued()
Gets the number of total queued Email messages.
public int getTotalProcessed()
Gets the number of total processed Email messages.
public SmtpClient getClient()
Gets or sets the smtpclient.
SmtpClient
object.public List getInnerExceptions()
Gets the exception list.
List
object.public int getDeliveryInterval()
Gets the interval of mail message delivery.
public void setDeliveryInterval(int value)
Gets the interval of mail message delivery.
value
- a int.public void waitForIdle()
Wait for the thread pool to be idle
public void addMessages(MailMessageCollection messages)
Add messages to Message Pool.
messages
- Mail messages collectionpublic void addMessage(MailMessage message)
Add messages to Message Pool.
message
- Mail message.public void start()
Start the Bulk send.
public void stop()
Stop the bulk sending.
public void clearMessages()
Clear the Email messages in the Message Pool.
public void dispose()
Releases the unmanaged resources used by the SmtpClientBulkSendAgent.
dispose
in interface com.aspose.ms.System.IDisposable
protected void doSendMailMessage(Object state)
Do email message sending in each thread.
state
- The state object.protected void dispose(boolean disposing)
Releases the unmanaged resources used by the SmtpClientBulkSendAgent, and optionally disposes of the managed resources.
disposing
- true to release both managed and unmanaged resources; false to releases only unmanaged resources.Copyright (c) 2008-2016 Aspose Pty Ltd. All Rights Reserved.