Export (0) Print
Expand All
3 out of 14 rated this helpful - Rate this topic

<mailSettings> Element (Network Settings)

Configures mail sending options.

<configuration> Element
  <system.Net> Element (Network Settings)
    <mailSettings> Element (Network Settings)
<mailSettings 
  <smtp> … </smtp> 
/mailsettings>

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

Attributes

None.

Child Elements

Attribute

Description

<smtp> Element (Network Settings)

Configures Simple Mail Transport Protocol options.

Parent Elements

Element

Description

<system.Net> Element (Network Settings)

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>
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.