InsaneProgrammer
Programmer
I'm trying to use the code below to send an email from my vb application. I get the following error:
Run-time error '429':
ActiveX component can't create object
The error occurs on the .Send command. I'm trying to do this on Windows 2000 Professional. I registered cdonts.dll. Do I need to have IIS installed? I've used similar code before in asp. Any help would be appreciated.
InsaneProgrammer.com
Run-time error '429':
ActiveX component can't create object
The error occurs on the .Send command. I'm trying to do this on Windows 2000 Professional. I registered cdonts.dll. Do I need to have IIS installed? I've used similar code before in asp. Any help would be appreciated.
Code:
Public Sub SendEmail(sFileName As String)
Dim oEmail As CDONTS.NewMail
Set oEmail = CreateObject("CDONTS.NewMail")
With oEmail
.From = "somebody@somewhere.com"
.To = "somebody@somewhere.com"
.Subject = "some subject"
.Body = "some more info"
.AttachFile sFileName
.Send
End With
Set oEmail = Nothing
End Sub
InsaneProgrammer.com