hi there
I've a 2003 server running MS SQL 2000. I've a customer table and an orders table. The orders have an end date. I'd like to fire an email off when an order ends thanking the customer.
So....
I've been trying to use a scheduled DTS package to do this.
I've set up a microsoft OLE DB connection to the database, followed by an Execute SQL Task, then an ActiveX script task.
I've set the output global variable's in the sql task to pull the variables out of it and it says it runs ok. when i get to the activex script task it says that there's an error which is CDO.Message.1 'interface not registered' this is the code i'm using....
Dim iMsg
Dim iConf
Dim Flds
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
Flds(" = "<local>"
Flds(" = True
Flds.Update
With iMsg
Set .Configuration = iConf
.CreateMHTMLBody " .To = DTSGlobalVariables("email").Value
.From = "webmaster@xyz.com"
.Subject = "thanks for your order....."
.Send
End With
If i try to use simpler code...
Dim iMsg
Set iMsg = CreateObject("CDO.Message")
With iMsg
.To = "me@xyz.com"
.Newsgroups = "area.example.newsgroup1"
.Subject = "Agenda for staff meeting"
.TextBody = "Please plan to present your status for the following projects..."
End With
Then i just get 'function not found'....
I've tried registering the cdosys.dll using 'Regsvr32.exe c:\windows\System32\CDOSYS.dll' but no joy - is there another activex dll that needs to be registered?
Any help really appreciated - Many Thanks
I've a 2003 server running MS SQL 2000. I've a customer table and an orders table. The orders have an end date. I'd like to fire an email off when an order ends thanking the customer.
So....
I've been trying to use a scheduled DTS package to do this.
I've set up a microsoft OLE DB connection to the database, followed by an Execute SQL Task, then an ActiveX script task.
I've set the output global variable's in the sql task to pull the variables out of it and it says it runs ok. when i get to the activex script task it says that there's an error which is CDO.Message.1 'interface not registered' this is the code i'm using....
Dim iMsg
Dim iConf
Dim Flds
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
Flds(" = "<local>"
Flds(" = True
Flds.Update
With iMsg
Set .Configuration = iConf
.CreateMHTMLBody " .To = DTSGlobalVariables("email").Value
.From = "webmaster@xyz.com"
.Subject = "thanks for your order....."
.Send
End With
If i try to use simpler code...
Dim iMsg
Set iMsg = CreateObject("CDO.Message")
With iMsg
.To = "me@xyz.com"
.Newsgroups = "area.example.newsgroup1"
.Subject = "Agenda for staff meeting"
.TextBody = "Please plan to present your status for the following projects..."
End With
Then i just get 'function not found'....
I've tried registering the cdosys.dll using 'Regsvr32.exe c:\windows\System32\CDOSYS.dll' but no joy - is there another activex dll that needs to be registered?
Any help really appreciated - Many Thanks