How to Enable and Configure SMTP Service

This article explains how to enable and configure the SMTP service on a Windows server. First, connect to the server via RDP, then use Server Manager to add the SMTP Server feature through 'Add roles and features.' Next, open IIS 6 Manager, set the SMTP service to start automatically, and configure the SMTP properties by enabling logging and anonymous access, adding 127.0.0.1 as an allowed IP address, and granting access permission to IIS_Users. Finally, test the setup by saving a provided VBS script and running it to send a test email.

How to Enable and Configure SMTP Service

1. RDP connect to the Server

Please refer to “How to RDP to the VPS or Dedicated Server”.

2. Open the Computer Management on the Server

Click “Server Manager”
click server manager

Click “Add roles and features”
add roles and features

next

server selection

SMTP features

add features

features

confirmation

close

3. Manage SMTP service in IIS6

iis6

Change the SMTP Service to Automatically Start
services

properties

automatic

start

4. Configure the SMTP

4.1 Navigate to SMTP Properties

navigate to smtp properties

4.2 Enable SMTP log

enable

4.3 Enable Anonymous Access

access

4.4 Add 127.0.0.1 for the IP Address

add

4.5 Add “IIS_Users “ as Permission to Access

permission

object types

groups

find now

iis

ok

5. Test the Codes

5.1 Copy the Following Codes and Save as xxx.vbs

---------- Begin of the script ---------
Dim sch, cdoConfig, cdoMessage
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "127.0.0.1"
.Item (schema & "smtpauthenticate") = true
.update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "Your email address"
.To = "Your email address"
.Subject = "Email test"
.TextBody = "This is the test body of the email"
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
MsgBox "Email Sent"
---------- End of the script ---------

5.2 Test the SMTP

open

email sent

email test

6. Done

You’ve now set up SMTP on your server! You can start sending emails from your applications or websites.

Keywords:

configure SMTP, test SMTP, Windows Server SMTP, setup SMTP Windows Server, SMTP configuration guide, SMTP testing tutorial, enable SMTP service, email server setup, VPS SMTP setup, dedicated server SMTP

Last Updated:   10/27/2026
Outline