How to Enable and Configure SMTP Service
1 Introduction
This tutorial shows you how to enable SMTP service to send emails from a website.
2 RDP connect to the Server
Please refer to “How to RDP to The VPS or Dedicated Server”.
3 Open the Computer Management on the Server
Click “Server Manager”
3.1 Click “Add roles and features”
4 Manage SMTP service in IIS6
4.1 Change the SMTP Service to Automatically Start
5 Configure the SMTP
5.1 Navigate to SMTP Properties
5.2 Enable SMTP log
5.3 Enable Anonymous Access
5.4 Add 127.0.0.1 for the IP Address
5.5 Add “IIS_Users “ as Permission to Access
6 Test the Codes
6.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 ---------
6.2 Test the SMTP
7 Done
Article ID: 339, Created: August 23, 2016 at 10:29 PM, Modified: May 25, 2020 at 10:02 PM