PDA

View Full Version : Installing CDOSYS


cruiser859
2006-08-18, 14:38 PM
I have a windows 2003 server and Plesk.

I have a mail program that says CDOSYS isn't installed. Where do I find it and how do I install it?

Thanks

Sakairu
2006-08-19, 09:42 AM
I have a windows 2003 server and Plesk.

I have a mail program that says CDOSYS isn't installed. Where do I find it and how do I install it?

Thanks

It should already be installed if you have a Windows 2003 Server. Could you post a sample of the code that is trying to make use of CDOSYS?

Also be aware that you need your SMTP service running and properly configured to use CDOSYS correctly.

Oh yeah, quick edit: Are you running IIS or Apache? Forgot to add that in my initial response.

--David

cruiser859
2006-08-19, 11:30 AM
David

This is the software that I am trying to run. http://www.designerfreesolutions.com/web/homepage.asp

When I ran the test they included none of the options it listed to send email were installed. So I am assuming that SMTP is probably not properly configured to use CDOSYS correctly. If that is the case where can I learn how to do that?

Apache TomCat 5.5.4 is running on the server as well as IIS. However SMTP is dependent on Event Log and IIS Admin Service.

This is the code from the test page for the CDO...

''''''''''''''''''''CDO (Port)'''''''''''''''''''''''''''''
pcomponent = "CDO (Port)"
body = ptext&pcomponent
on error resume next

Dim iMsg, iConf, Flds, strHTML, iBP
Const cdoSendUsingPort = 2

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")= psmtpserver
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 9999
'For authentocation
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = psmtpusername
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = psmtppassword

.Update
End With

With iMsg
Set Header = .Fields
With Header
.Item("urn:schemas:mailheader:Return-path") = fromEmail &"("&fromName&")"
.Update
End With

Set .Configuration = iConf
.To = toEmail &"("&toName&")"
.From = fromEmail &"("&fromName&")"
.Subject = subject
.ReplyTo = fromEmail &"("&fromName&")"
.textBody = body
if pattachment<>"" then
myarrayt = Split(pattachment, ",")
numberofattached = ubound(myarrayt)+1
i=0
for i=0 to numberofattached - 1
.AddAttachment (Server.Mappath("../attachments/"&myarrayt(i)&""))
next
end if
.Send
End With

' Clean up variables.
Set iBP = Nothing
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

if err<>0 then
response.write "<b>"&pcomponent &"</b><font color=red> is not installed.</font><br><br>"
else
response.write "<b>"&pcomponent &"</b><font color=blue> is installed.</font><br><br>"
end if
err.clear

''''''''''''''''''''CDO (PickUp)'''''''''''''''''''''''''''''
pcomponent = "CDO (PickUp)"
body = ptext&pcomponent
on error resume next

'Dim iMsg, iConf, Flds, strHTML, iBP
Const cdoSendUsingPickup = 1

set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")

Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPickup
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")= psmtpserver
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 9999
'For authentocation
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = psmtpusername
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = psmtppassword

.Update
End With

With iMsg
Set Header = .Fields
With Header
.Item("urn:schemas:mailheader:Return-path") = fromEmail &"("&fromName&")"
.Update
End With

Set .Configuration = iConf
.To = toEmail &"("&toName&")"
.From = fromEmail &"("&fromName&")"
.Subject = subject
.ReplyTo = fromEmail &"("&fromName&")"
.textBody = body
if pattachment<>"" then
myarrayt = Split(pattachment, ",")
numberofattached = ubound(myarrayt)+1
i=0
for i=0 to numberofattached - 1
.AddAttachment (Server.Mappath("../attachments/"&myarrayt(i)&""))
next
end if
.Send
End With

' Clean up variables.
Set iBP = Nothing
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing

if err<>0 then
response.write "<b>"&pcomponent &"</b><font color=red> is not installed.</font><br><br>"
else
response.write "<b>"&pcomponent &"</b><font color=blue> is installed.</font><br><br>"
end if
err.clear

''''''''''''''''''''CDO II ''''''''''''''''''''''''''''''
pcomponent = "CDO II"
body = ptext&pcomponent
Set mail = server.CreateObject("CDO.Message")
mail.From = fromEmail &"("&fromName&")"
mail.To = toEmail &"("&toName&")"
mail.Subject = subject
mail.textBody = body
if pattachment<>"" then
myarrayt = Split(pattachment, ",")
numberofattached = ubound(myarrayt)+1
i=0
for i=0 to numberofattached - 1
mail.AddAttachment (Server.Mappath("../attachments/"&myarrayt(i)&""))
next
end if
on error resume next
mail.Send
Set Mail = Nothing
if err<>0 then
response.write "<b>"&pcomponent &"</b><font color=red> is not installed.</font><br><br>"
else
response.write "<b>"&pcomponent &"</b><font color=blue> is installed.</font><br><br>"
end if
err.clear

Thanks

Stewart