Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the default timeout on the SmtpClient object?

What does the timeout default to in the .NET SmtpClient object? What unit of time is it (seconds, milliseconds, etc)?

like image 704
Daniel Avatar asked Apr 22 '13 18:04

Daniel


People also ask

What is SmtpClient timeout?

Timeout Property. Gets or sets the maximum time interval(seconds) the object will wait for a response from server before returning an error.

What is SmtpClient C#?

SMTP Client in C# and VB.NETThe Simple Mail Transfer Protocol (SMTP) is the only standard protocol for sending mail messages over the Internet. GemBox. Email enables you to work with the SMTP protocol in C# and VB.NET using an SmtpClient class.

How do I dispose of SmtpClient objects?

The SmtpClient class has no Finalize method. So an application must call Dispose to explicitly free up resources. The Dispose method iterates through all established connections to the SMTP server specified in the Host property and sends a QUIT message followed by gracefully ending the TCP connection.


2 Answers

The default value is 100,000 (100 seconds).

http://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.timeout.aspx

like image 190
Stefan Steiger Avatar answered Nov 04 '22 22:11

Stefan Steiger


The unit is milliseconds, and the default value is 100,000 which is equivalent to 100 seconds.

like image 33
erntay2 Avatar answered Nov 05 '22 00:11

erntay2