Installing CDONTS
Copy CDONTS.dll to c:\windows\system32 (32 bit OS)
Open the command prompt and run "regsvr32 c:\windows\system32\cdonts.dll"
Copy CDONTS.dll to c:\windows\SysWOW64 (64 bit OS)
Open the command prompt and run "regsvr32 c:\windows\SysWOW64\cdonts.dll"
Press OK when registration succeeds
Installing SMTP
Open Server Manager, you can open this several different ways in Windows Server 2008. Probably the quickest way to open Server Manager is to right click "My Computer" and choose "Manage", another way is open "Control Panel" go to "Program and Features" and select "Turn Windows features on or off". A third way to open it is "Server Manager" option under Administrative Tools.
Under Features, select Add Roles
Configure SMTP Server
Make sure when you when you install the SMTP service, you enable Relay for localhost. Go to Administrative Tools > Internet Information Services (IIS6) > SMTP Virtual Server > Right click, Properties > Access Tab > Relay button > Add 127.0.0.1 in the option
Configure SMTP Security
Grant the appropriate permissions on C:\inetpub\mailroot\pickup (I granted USERS group Modify permissions). You could get permission denied if the folder security isn't adjusted.
Enable 32 bit Application in Application pool
Server Manager > Roles > Web Server (IIS) > Internet Information Services (IIS) Manager > Select Server Name > Application Pool
On the right panel (empty space) Right Click > Set application pool default > Enable 32bit Application > True
To test the function
Create a TEST.ASP with the following code and put the file in C:\Inetpub\wwwroot. Change the "CDONTSMail.To=" value to your e-mail address. Navigate to http://localhost/test.asp, if all is configured ok then you should receive the mail message. If you do not receive the e-mail check the folders under c:\inetpub\mailroot to see if its queued up.
<%
Dim strBody
Dim CDONTSMail
Set CDONTSMail = CreateObject("CDONTS.NewMail")
CDONTSMail.From= "user@example.com"
CDONTSMail.To= "user@example.com"
CDONTSMail.Subject="This is a Test email"
strBody = "This is a test message." & vbCrLf
CDONTSMail.Body= strBody
CDONTSMail.Send
set CDONTSMail=nothing
%>