Jaa


How to: Install and Configure SMTP Virtual Servers in IIS 6.0

Note

The IIS SMTP Virtual Server Component that is mentioned in this article is part of IIS 6.0, the support for which has ended with the support of Windows Server 2003. To relay emails to Office 365, use one of the supported versions of Exchange Server.

In order to send e-mail from an ASP.NET Web application, you must have the Simple Mail Transfer Protocol (SMTP) service of Internet Information Services (IIS) installed and configured on your server. The IIS SMTP service is a simple component for forwarding e-mail messages to an SMTP server for delivery.

Installing the SMTP Service

The SMTP service is not installed by default with IIS. You must install the SMTP service using Control Panel. Installing the SMTP service creates a default SMTP configuration that you can then customize by using IIS Manager.

To install the SMTP service on IIS 6.0

  1. On the Start menu, click Control Panel, double-click Add or Remove Programs, and then click Add/Remove Windows Components.

  2. In the Components list, click Application Server, and then click Details.

  3. In the Subcomponents of Application Server list, click Internet Information Services (IIS), and then click Details.

  4. In the Subcomponents of Internet Information Services (IIS) list, select the SMTP Service check box, and then click OK.

  5. Click Next. If you are prompted for the Windows CD or the network install path, follow the instructions.

  6. Click Finish.

When you install the SMTP service, a default SMTP server configuration is created with a message store in C:\Inetpub\Mailroot.

When you are setting up the SMTP service, you can configure global settings for the SMTP service, as well as settings for individual components of the virtual server. The IIS SMTP service is a relay agent only. E-mail messages are forwarded to an SMTP server for delivery.

Configuring the SMTP Virtual Server

Installing the SMTP service will create a new node in IIS Manager. In order to configure the SMTP virtual server, you must start IIS Manager. For more information, see the topic "SMTP Administration" in the IIS Operations Guide.

Important noteImportant Note:

You must be logged on as a member of the Administrators group on the local computer to perform the following procedure (or procedures), or you must have been delegated the appropriate authority.

To start IIS Manager from the Run dialog box

  1. On the Start menu, click Run.

  2. In the Open box, type inetmgr and then click OK.

To start IIS Manager from the Administrative Services console

  1. On the Start menu, click Run. In the Run text box, type control panel, and then click OK.

  2. In the Control Panel window, click Administrative Tools.

  3. In the Administrative Tools window, click Internet Information Services.

Default Settings

The default SMTP virtual server has the following default settings. If you create a new virtual server, you can configure default settings using the New Virtual Server Wizard.

  • Name: The name of the virtual server that appears in IIS Manager.You can change the name of the virtual server in IIS Manager. Simply right-click the virtual server and then click Rename.

  • IP address/TCP port: All unassigned/25.You can use the General tab in the SMTP virtual server properties dialog box to change this setting. If you change this setting, you must specify an IP address and TCP port combination that is not being used by another SMTP virtual server. TCP port 25 is both the default TCP port and the recommended TCP port. More than one virtual server can use the same TCP port, but they must be configured with different IP addresses. If you do not set a unique IP address and TCP port combination, the SMTP virtual server will not start.

Default domain: The domain name that is listed on the Computer Name tab in System Properties.The default domain is used to stamp messages from addresses that do not have a domain. An SMTP virtual server can have only one default domain, and it cannot be deleted. To change the name of the default domain in IIS Manager, double-click the virtual server, and then double-click Domains. Right-click the local (or default) domain, and then click Rename.

  • Home directory: C:\Inetpub\Mailroot.The home directory is the root of your SMTP content directories, and it must be local to the computer on which the SMTP service runs.

See Also

Tasks

How to: Create and Configure Local ASP.NET Web Sites in IIS 6.0