ConnectAttempts Property

<< Click to Display Table of Contents >>

Navigation:  Reference > SmtpMail >

ConnectAttempts Property

 

ConnectAttempts specifies how many times AddEmail will try to connect to the outgoing mail server before returning connection error.

 

Syntax

 

[Visual Basic]


objSmtpMail.ConnectAttempts = 1

 

[VBScript]


objSmtpMail.ConnectAttempts = 1

 

[C#]


objSmtpMail.ConnectAttempts = 1;

 

[C++]


HRESULT get_ConnectAttempts(LONG*);

HRESULT put_ConnectAttempts(LONG);

 

spSmtpMail->PutConnectAttempts(1);

 

 

Remarks

 

Default value of ConnectAttempts property is 2. To send an e-mail, AddEmail connects to the outgoing mail server specified in SmtpServer property. If connection could not be established, AddEmail will make ConnectAttempts attempts to connect before giving up and reporting connection error. If the server is down and does not respond, each connect attempt takes 20-30 seconds. You might want to set ConnectAttempts to 1 if you are sending e-mails directly without using SMTP server in order to speed up sending.