Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

<mailSettings> Element (Network Settings)

Configures mail sending options.


<mailSettings
    <smtp> … </smtp>
/>

The following sections describe attributes, child elements, and parent elements.

Attributes

None.

Child Elements

Attribute Description

smtp

Configures Simple Mail Transport Protocol options.

Parent Elements

Element Description

system.net

Contains settings that specify how the .NET Framework connects to the network.

The following code example specifies the appropriate SMTP parameters to send e-mail using the default network credentials.

<configuration>
  <system.net>
    <mailSettings>
      <smtp deliveryMethod="network">
        <network
          host="localhost"
          port="25"
          defaultCredentials="true"
        />
      </smtp>
    </mailSettings>
  </system.net>
</configuration>
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft