How to Enable and Configure SMTP Service

Beginner-friendly guide to configure SMTP and test SMTP on Windows Server. Learn how to enable SMTP service, set it up for email sending, and verify it works on your VPS or dedicated server.

Introduction

This guide will help you enable and set up the SMTP service so your server can send emails (such as website notifications or system alerts).

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

Outline