Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Configures mail sending options.
<configuration>
<system.net>
<mailSettings>
<mailSettings>
<smtp>...</smtp>
</mailSettings>
The following sections describe attributes, child elements, and parent elements.
None.
Attribute | Description |
---|---|
<smtp> Element (Network Settings) | Configures Simple Mail Transport Protocol options. |
Element | Description |
---|---|
<system.Net> Element (Network Settings) | Contains settings that specify how the .NET Framework connects to the network. |
The following example specifies the appropriate SMTP parameters to send email using the default network credentials.
<configuration>
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network
host="localhost"
port="25"
defaultCredentials="true"
/>
</smtp>
</mailSettings>
</system.net>
</configuration>
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Please sign in to use this experience.
Sign in