MaxThreads Property

<< Click to Display Table of Contents >>

Navigation:  Reference > SmtpMail >

MaxThreads Property

 

MaxThreads property specifies the maximum number of threads that SmtpMail object can create when sending messages asynchronously using SendAsync (Enterprise version only).

 

Syntax

 

[Visual Basic]


objSmtpMail.MaxThreads = 10

 

[VBScript]


objSmtpMail.MaxThreads = 10

 

[C#]


objSmtpMail.MaxThreads = 10;

 

[C++]


HRESULT get_MaxThreads(LONG*);

HRESULT put_MaxThreads(LONG);

 

spSmtpMail->PutMaxThreads(10);

 

 

Remarks

 

Default value of MaxThreads property is 5, accepted range is 1 - 1000. AddEmail supports simultaneous sending of several messages. This feature is useful if application has to send a large number of messages, especially if messages are sent directly without using outgoing mail server. SmtpMail object creates one or more worker threads that send messages from its message queue. MaxThreads property limits the number of threads that are running at the same time, therefore setting the limit on the number of simultaneously transferred messages. MaxThreads property is available only in AddEmail Enterprise version. AddEmail Professional always uses one thread to send messages.