I have a hosting site that supports CDONTS. I am writting my code mostly in C# for ASP.NET. When I look up CDONTS I can not find any C# code. Here is a code example I have found.
Dim MyBody
Dim MyCDONTSMail
Set MyCDONTSMail = CreateObject("CDONTS.NewMail")
MyCDONTSMail.From= "regent@mypacks.net"
MyCDONTSMail.To= "dogy@mypacks.net"
MyCDONTSMail.Subject="sending email"
MyBody = "will it work"
MyCDONTSMail.Body= MyBody
MyCDONTSMail.Send
set MyCDONTSMail=nothing
alert ("sent?")
Where should I put code like this? Embeded in HTML or on the server side? Is it VB (Visual Basic) code?
When I try it as VB.net code I get errors like:
Error 41 Type 'CDONTS.NewMail' is not defined. C:\Users\charles\Documents\Visual Studio 2008\WebSites\MC4HA\TryBasicMail.aspx.vb 6 23 C:\...\MC4HA\
Is there some way to get CDONTS.NewMail defined?
Thanks,
Chas