Support - Knowledge base

Giving you the answers you need

Why not try our knowledge base for instant help and advice to enhance your online experience with Register365? From within the knowledge base you can browse our frequently asked questions and find the right answers to help solve your queries.

Home  >  Scripting  >  ASP (Active Server Pages)  >  View Article

How do I use CDOSYS / CDONTS? [Windows Only]

2*2*2*2*2*

Article

We have got CDOSYS supported on our servers.

CDONTS is no longer supported by Microsoft and as such in Windows 2003, CDOSYS is now the defacto standard.

Here is some sample code that you should be able to amend to work on your web site.

<%@ Language=VBScript %> <%   
Const cdoSendUsingPort = 2   
Dim iMsg Set iMsg = CreateObject("CDO.Message") Dim iConf Set iConf = CreateObject("CDO.Configuration")   
'--- LOCAL SENDER TEST   
Dim Flds Set Flds = iConf.Fields   
With Flds   
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort   
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.hosting365.ie"   
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 10   
.Update   
End With   
Dim BodyText   
BodyText = "CDO remote sender test"   
Set iMsg.Configuration = iConf iMsg.To = "name@domain_name" ' "user@domain.ie" iMsg.From = "name@domain_name" ' "user@domain.ie" iMsg.Subject = "CDO remote sender test " & Now iMsg.HTMLBody = BodyText iMsg.Send   
Set iMsg = Nothing Set iConf = Nothing   
%>

Rate This Article

How useful was this article?

Not useful A little useful Useful Very useful Everything I needed