Click to Rate and Give Feedback

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
 
<smtp> Element (Network Settings) 

Configures the delivery method and from address for sending e-mails.

<smtp
  deliveryMethod="method" 
  from="from address" 
  <specifiedPickupDirectory> … </ specifiedPickupDirectory >
  <network> … </network>
/>

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

Attributes

Attribute Description

deliveryMethod

Specifies the delivery method for e-mails. Acceptable values are network, PickupDirectoryFromIis, and SpecifiedPickupDirectory.

from

Specifies the from address for e-mails.

Child Elements

Attribute Description

specifiedPickupDirectory

Configures the local directory for a Simple Mail Transport Protocol (SMTP) server.

network

Configures the network options for an external SMTP server.

Parent Elements

Element Description

<mailSettings> Element (Network Settings)

Configures mail sending options.

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" from="ben@contoso.com">
        <network
          host="localhost"
          port="25"
          defaultCredentials="true"
        />
      </smtp>
    </mailSettings>
  </system.net>
</configuration>
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker