[ASP3.01] Can I use ASP Components such as CDONTS, ADONTS, CDO and others on my package?

These components are available, but do require ASP.net. Therefore you must be using a Windows hosting package to take advantage of them - they are unsupported by Sun One ASP.

An example CDONTS script would consists of:

<%
Set myCDONTSMail = CreateObject("CDONTS.NewMail")
Dim myCDONTSMail
Dim strFrom
Dim strTo
Dim strSubject
Dim strMessage

strFrom="test@somedomain.com"
strTo="test@someotherdomain.com"
strSubject = "Mail sent by CDONTS"
strBody= "Test message .. please ignore"

myCDONTSMail.Send strFrom,strTo,strSubject,strBody

Set myCDONTSMail = Nothing
%>

An Example CDO script to send mail would be

Set cdoConfiguration = Server.CreateObject ("CDO.Configuration")

With cdoConfiguration
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
.Fields.Update
End With

Set myMail=CreateObject("CDO.Message")
myMail.Configuration = cdoConfiguration
myMail.Subject = "Subject Here"
myMail.From = "test@someotherdomain.com"
myMail.To = strEmailAddress
myMail.HTMLBody = MajorFile
myMail.Send
set myMail=nothing

set cdoConfiguration = nothing

Was this answer helpful?

 Print this Article

Also Read

[ASP3.02] Can I use Access Databases on my package with Hosting cPanel?

We only offer MySQL databases on our packages. Microsoft Access Databases are not fully ODBC...

[ASP3.03] How can I change the file name extension of my index page?

It is possible to name your default index page something other than index.html, index.cgi,...

[ASP3.04] Common server software requirements

All standard Apache modules are installed on the web servers, including mod_rewrite. In addition,...

[ASP3.05] What is the server path?

The path to your website is partially determined by your domain name, but is in the following...

[ASP3.06] Is ASP.NET 3.5 available? Why does my script report only version 2?

This applies to Windows hosting accounts only. ASP.NET 3.5 is not a stand alone framework like...