I get an error: "Method 'send' of object 'INewMail' failed" when I do the
.send in the function SendMail in my Class.

I am using VB6, Windows 2000 Pro, Personal Web Manager to run the IIS services.

The first thing I did was to reference:
Microsoft CDO for Windows 2000 Library
Microsoft CDO 1.21 Library
Microsoft CDO for NTS 1.2 Library

I picked all three just to make sure I won't miss anything.

I then created my class (clsMail) as:

Private strTo As String
Private strFrom As String
Private strCC As String
Private strBcc As String
Private strSubject As String
Private strBody As String
Private strFile As String
Private oMail As CDONTS.NewMail

Public Property Let SendTo(ByVal sTo As String)
strTo = sTo
End Property

Public Property Get SendTo() As String
SendTo = strTo
End Property

Public Property Let SendFrom(ByVal sFrom As String)
strFrom = sFrom
End Property

Public Property Get SendFrom() As String
SendFrom = strFrom
End Property

Public Property Let SendCC(ByVal sCC As String)
strCC = sCC
End Property

Public Property Get SendCC() As String
SendCC = strCC
End Property

Public Property Let SendBcc(ByVal sBcc As String)
strBcc = sBcc
End Property

Public Property Get SendBcc() As String
SendBcc = strBcc
End Property

Public Property Let SendSubject(ByVal sSubject As String)
strSubject = sSubject
End Property

Public Property Get SendSubject() As String
SendSubject = strSubject
End Property

Public Property Let SendBody(ByVal sBody As String)
strBody = sBody
End Property

Public Property Get SendBody() As String
SendBody = strBody
End Property

Public Property Let SendFile(ByVal sFile As String)
strFile = sFile
End Property

Public Property Get SendFile() As String
SendFile = strFile
End Property

Public Function SendMail() As Boolean
Set oMail = New CDONTS.NewMail
With oMail
.BodyFormat = 1
.To = SendTo
If Trim(SendCC) <> "" Then
.Cc = SendCC
End If
If Trim(SendBcc) <> "" Then
.Bcc = SendBcc
End If
.From = SendFrom
.Subject = SendSubject
.Body = SendBody
.Send
End With
Set oMail = Nothing
End Function
******************************

In my form the code is:

Dim tstMail As New clsMail

Private Sub Command1_Click()

tstMail.SendFrom = "hsohi@debtrecoverynetwork.com"
tstMail.SendTo = "hsohi@debtrecoverynetwork.com"
tstMail.SendSubject = "Test"
tstMail.SendBody = "Test"
tstMail.SendMail


End Sub

*****************

I get an error: "Method 'send' of object 'INewMail' failed" when I do the
.send in the function SendMail in my Class.

Does anybody know why??