all groups > inetserver asp components > february 2004 >
You're in the

inetserver asp components

group:

CDONTS vs CDO


CDONTS vs CDO RIP
2/28/2004 5:31:48 AM
inetserver asp components:
OK, so obviously cdonts doesnt work with ii6. Why its
depreciated, i dont know. What i need to know is how to
just send a simple email, my old cold had the cdonts.to
cdonts.subject ect ect, i cant find anywhere that explains
the object enough to say how to send a simple email with
the to, from, subject and body fields. somebody just
wanna put in an example code that sends an email?? i feel
Re: CDONTS vs CDO Roland Hall
2/28/2004 3:17:16 PM
[quoted text, click to view]
: OK, so obviously cdonts doesnt work with ii6.

Actually, it does. It's just not installed and it has been replaced by CDO.

: Why its depreciated, i dont know.

CDO replaces it.

: What i need to know is how to
: just send a simple email, my old cold had the cdonts.to
: cdonts.subject ect ect, i cant find anywhere that explains
: the object enough to say how to send a simple email with
: the to, from, subject and body fields. somebody just
: wanna put in an example code that sends an email?? i feel
: dumb asking, but i need help. ty

I went to my google toolbar and typed in CDO How-to. A whole slew of links
came up and this was the 2nd on the list:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;286431

Enjoy!

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp

Re: CDONTS vs CDO Josh Saiz
3/4/2004 1:22:09 PM

[quoted text, click to view]

Had the same problem. With some research, I figured that
you need to use the CDO.Message component instead of
CDONTS.NewMail. Also, you need to decide if you want to
send the message as HTML (use HTMLBody attribute) or Text
(use TextBody attibute instead of the Body attribute).
That's it. Here's some sample code that works for me:

Set objCDOMail = Server.CreateObject("CDO.Message")
objCDOMail.From = "someone@blahblah.com"
objCDOMail.To = "someone@company.com"
objCDOMail.Subject = "Test Subject..."
objCDOMail.TextBody = bodystr

objCDOMail.Send
Set objCDOMail = Nothing


Re: CDONTS vs CDO Roland Hall
3/4/2004 4:41:52 PM
[quoted text, click to view]

Same with what as what?

: With some research, I figured that
: you need to use the CDO.Message component instead of
: CDONTS.NewMail.

Yes, unless you install CDONTS on W2K3, you need to use CDO and you use CDO
commands with it, not CDONTS commands.

: Also, you need to decide if you want to
: send the message as HTML (use HTMLBody attribute) or Text
: (use TextBody attibute instead of the Body attribute).
: That's it. Here's some sample code that works for me:

Yes, TextBody for plain text, HTMLBody for HTML messages.

: Set objCDOMail = Server.CreateObject("CDO.Message")
: objCDOMail.From = "someone@blahblah.com"
: objCDOMail.To = "someone@company.com"
: objCDOMail.Subject = "Test Subject..."
: objCDOMail.TextBody = bodystr
:
: objCDOMail.Send
: Set objCDOMail = Nothing

Glad to hear you got it working.

AddThis Social Bookmark Button