Crystone AB
Control panel

CDONTS

If you’ve previously used CDONTS in our Windows package, you must now use CDOSYS if you are placed on a Windows 2003 Server. This is because Microsoft had already removed the CDONTS function in Windows 2000, which we used previously, but it was still available through a compatibility object. However, you now have to use CDOSYS.

Below you will find an ASP code example.

Dim sMsg
Dim sTo
Dim sFrom
Dim sSubject
Dim sTextBody

sTo = "recipient@maildomain.com"
sFrom = "fromaddress@maildomain.com"
sSubject = "ärenderad"
sTextBody = "Plaintext innehåll (meddelandet)"

Dim objMail
'Skapa mailobjekt
Set objMail = Server.CreateObject("CDO.Message")

'Ställ in nyckelegenskaper
objMail.From = sFrom
objMail.To = sTo
objMail.Subject= sSubject
objMail.TextBody = sTextBody

'Skicka brevet
objMail.Send

'Stäng mailobjektet
Set objMail = Nothing