CDONT to CDO

H

Harvey Waxman

Can someone show me how to modify this simple code from CDONTS to CDO to bring
it up to date?

It works fine now and maybe I should leave it alone?

<%
Dim t1,instructions
t1 = "Instructions"
instructions = Request.Form("instructions")
Dim ObjMail
Set ObjMail = Server.CreateObject("CDONTS.NewMail")
ObjMail.To = "(e-mail address removed)"
ObjMail.From = "(e-mail address removed)"
ObjMail.Subject = "Dinghy Dogs order"
ObjMail.Body = t1 & vbtab & instructions
ObjMail.Send
Set ObjMail = Nothing
Response.Write"Thank You For Your Order"
%>
 
R

Ray at

For the way to do it with the fewest changes:

Set ObjMail = Server.CreateObject("CDONTS.NewMail")
becomes
Set ObjMail = Server.CreateObject("CDO.Message")

ObjMail.Body = t1 & vbtab & instructions
becomes
ObjMail.TextBody = t1 & vbtab & instructions

See http://www.aspfaq.com/show.asp?id=2026 for more detailed informaton on
CDO. And good job switching! :]

Ray at home
 
H

Harvey Waxman

Ray at said:
See http://www.aspfaq.com/show.asp?id=2026 for more detailed informaton on
CDO. And good job switching! :]

Thanks for the references. They are way to detailed for my modest requirements
though, getting too far under the hood for my needs. They assume in know much
more than I do. I need more of what you showed me and couldn't find anything
that basic.

Thanks.
 
R

Ray at

You don't have to read the whole article if you aren't interested in sending
attachments or anything.

Set cdoMessage = CreateObject("CDO.Message")

With cdoMessage
Set .Configuration = cdoConfig
.From = "(e-mail address removed)"
.To = "(e-mail address removed)"
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Send
End With

Set cdoMessage = Nothing

That's as undetailed as it'll be. If you don't know as much as "they"
assume you do, then you have to work to know more!

Ray at home




Harvey Waxman said:
Ray at said:
See http://www.aspfaq.com/show.asp?id=2026 for more detailed informaton on
CDO. And good job switching! :]

Thanks for the references. They are way to detailed for my modest requirements
though, getting too far under the hood for my needs. They assume in know much
more than I do. I need more of what you showed me and couldn't find anything
that basic.

Thanks.


--
Harvey Waxman DMD
73 Wright Lane
Wickford, RI 02852
Remove thefrown to email me
 
H

Harvey Waxman

Ray at said:
That's as undetailed as it'll be. If you don't know as much as "they"
assume you do, then you have to work to know more!

Once again, thanks.

I have nothing to do with the server folks. I have a modest website and wanted
to have email forwarded to me without using mailto:

I was told that asp was what I needed and since the server that hosts my site
is a Windows NT (I use Macs) I found a CDONTS asp script that I modified for my
own use.

That's as far as my needs go or will go. I'm even unsure what the 'undetailed'
script in your last post was for.

Regards


Harvey
 
S

Steven Burn

I'm even unsure what the 'undetailed' script in your last post was for.

It was the minimal code you needs for a CDO mail script (to replace your
CDONTS one)

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
 
R

Ray at

If you're on NT, you cannot use CDO. CDO first appeared in Windows 2000.
It's unlikely/unhopeful that you're still on an NT 4 server though. Find
out for sure. If NT, use CDONTS. If 2000 or higher, use CDO.

Ray at home
 
H

Harvey Waxman

Ray at said:
If 2000 or higher, use CDO.

It is Windows 2000. I would still like to see a list of the statements in
CDONTS and their CDO counterparts, if there is such a list.

I am passing the data from a form to the email so it's more than simple text
email. I posted the abbreviated code last time. and there were only two
changes if I recall.
 
D

droptop426rt

I am also looking for this answer

Help, please?!?!?

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top