SmtpClient.ServicePoint Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the network connection used to transmit the e-mail message.

Namespace:   System.Net.Mail
Assembly:  System (in System.dll)

Public ReadOnly Property ServicePoint As ServicePoint

Property Value

Type: System.Net.ServicePoint

A ServicePoint that connects to the Host property used for SMTP.

Exception Condition
InvalidOperationException

Host is null or the empty string ("").

-or-

Port is zero.

The settings for the ServicePoint property are created using defaults specified in the application or machine configuration files and the ServicePointManager class.

The following code example demonstrates accessing the ServicePoint property.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: