PDA

View Full Version : CDONTS v CDOSYS


Bobba Buoy
07-06-2004, 07:42 AM
I am under the understanding that CDOSYS is the Windows 2003 Server equivalent of CDONTS. Is that correct? If so, do I have to re-write my email code before I move my sites over to a Windows 2003 server? How big of a process is that? Where can I find a resource to help me do that?

Thanks!

Horus_Kol
07-06-2004, 08:09 AM
CDONTS is no longer supported on 2003...

however, you can jam it in (like we did :) )

if you don't have control of your server, however, you will have to rewrite your code for the new CDOSYS library.

I don't think there is much difference, but there is enough to make it not backwards compatible (some CDONTS methods don't work in CDOSYS)

the MS website is stuffed full of info on this - have a search of their knowledge base.

Bobba Buoy
07-06-2004, 08:46 AM
Thanks for the help. I will go to MS for more info.

afterburn
07-06-2004, 09:16 AM
Dim objCDO_Config As New CDO.Configuration
Dim objCDO_Message As New CDO.Message

Set objCDO_Config = New CDO.Configuration

With objCDO_Config
.Fields(cdoSendUsingMethod) = cdoSendUsingPort 'instead of
.Fields(cdoSMTPServer) = g_strSMTPServer 'MX Record
.Fields(cdoSMTPServerPort) = g_lngSMTPPort '25
.Fields(cdoSMTPConnectionTimeout) = g_lngTimeout
.Fields(cdoSMTPAccountName) = g_strAccount
.Fields(cdoSendEmailAddress) = g_strFrom
.Fields(cdoSendUserReplyEmailAddress) = g_strFrom
'.Fields(cdoSMTPAuthenticate) = cdoBasic
'.Fields(cdoSendUserName) = g_strUser
'.Fields(cdoSendPassword) = g_strPass
.Fields.Update
End With

With objCDO_Message
.To = ""
'settting go here BCC,BodyHTML etc.
End With




VB Code.....

Bobba Buoy
07-06-2004, 01:18 PM
So this is the cdosys code?

afterburn
07-06-2004, 02:14 PM
Yeah, its a bit different. But allows you to use User Name/PWD on NTLM Auth or Basic. Remote server can be specified also. Just fill in the rest of the properties and call Send Method. Throws error if it can not send the message for 550 not a gateway or can not reach server.

Just deal with them in the page.

One other not the code is VB6 with early binding. Your going to need to call the object in the set statement like the rest of the ADO stuff. Thats the only different off hand.