First of all i am sorry, this has probably come up many times before....
But i am looking for a working script will send email automtically from an ASP page.
I have tried many examples, at the moment i have this;
Code:
<%
sch = "http://schemas.microsoft.com/cdo/configuration/"
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "127.0.0.1"
.update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "[email protected]"
.To = "[email protected]"
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>
and i get this error
Error Type:
(0x8004020F)
The event class for this subscription is in an invalid partition
/picco/sendEmail.asp, line 106
Anyone got a working version? Is there something mising on my machine?
I have WinXP Pro.
Picco
www.crmpicco.co.uk
www.ie7.com