SMTP: The service could not bind instance 1. The data is the error code.

I was helping a client server as mentioned the email form could send an email.

The server ran with IIS 7.5 with IIS SMTP services. Hence, I was trying to open the IIS 6.0 and start the SMTP services when found it is stopped.


However, when I trying to start the IIS SMTP services, it is prompt an alert.

At the same time, the event viewer is showing the error as below.

Event ID: 115
Source: SMTPSVC
Description: The service could not bind instance 1.
The data is the error code.

With the above error, it might meant that the SMTP port of 25 is being assigned to your email software installed to the server. To overcome the problem, refer to the step as below.

1. Open the IIS 6.0.
2. Double click the hostname and right click the Default SMTP Virtual Server then click on Properties.
3. Click on the Advance button and change the TCP port to 2525.

Well done, you have done.

Install CDONTS to 64 bits Windows server

Today I found out 1 of the server do not have CDONTS installed at all and the server found to be 64bits Windows Server 2008 server.

Firstly, I did not discover that this is a 64 bits server and I have directly copy the cdonts.dll to the C:\Windows\System32 folder and try to register it but failed.

Then I found out it is a 64 bits server. Hmm.. Then I try to move the cdonts.dll to C:\Windows\SysWow64 folder and trying to register it. Step will be as detail below.

1. Open a command prompt with Administrator privilege.
2. Go to the path of C:\Windows\SysWow64, cd C:\Windows\SysWow64.
3. Register the library, regsvr32 cdonts.dll.
4. Try to send the email and it is working fine 🙂

WScript: Get Email when disk space low

Yesterday, Mick Genie come out a script to generate the free space from your computer, and it might useful for you for certain purpose.

However, I have think off if this is very inconvenience if you need to login to the computer for every time.

Hence I have come out another script to use IIS SMTP server to send an email to you when the disk space is low.

Set objMessage = CreateObject(“CDO.Message”)
objMessage.Subject = “Disk Space Alert: ServerName”
objMessage.From = “Disk Space Alert<Disk Space Alert>”
objMessage.To = “[email protected]

Dim objShell, space_value, Result
Set objShell = Wscript.CreateObject(“WScript.Shell”)

Set DiskSet = GetObject(“winmgmts:{impersonationLevel=impersonate}”).ExecQuery (“select * from Win32_LogicalDisk where DriveType=3″)
For each Disk in DiskSet
If (Disk.Name=”D:”) Then
Disk.FreeSpace=Disk.FreeSpace/1024
Disk.FreeSpace=Disk.FreeSpace/1024
Disk.FreeSpace=Disk.FreeSpace/1024
Result = Disk.FreeSpace
End If
Next
space_value = Result
Wscript.echo space_value
if space_value < 30 then

objMessage.TextBody = “Server Disk Space Low, ” & space_value & ” GB”
objMessage.Configuration.Fields.Item (“http://schemas.microsoft.com/cdo/configuration/sendusing”) = 2
objMessage.Configuration.Fields.Item (“http://schemas.microsoft.com/cdo/configuration/smtpserver”) = “127.0.0.0”
objMessage.Configuration.Fields.Item (“http://schemas.microsoft.com/cdo/configuration/smtpserverport”) = 25
objMessage.Configuration.Fields.Update
‘objMessage.Send

end if

You need to change the Subject, From, To, Email IP, and port only.

Note: This script tested only work with 32bits box, but not 64 bits box.  Save this file to anyname.vbs will do.