pinkstonm
asked on
CDOSYS
How knows where there is exact information on the use of CDOSYS in ASP. I need to convert all my CDONTS to CDOSYS because of an environement change.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/_cdosys_about_cdo_for_windows_2000.asp
Here's a good example of sending an e-mail via CDO on the MSDN site:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_clb_sending_a_web_page_by_smtp_mail_using_cdosys_vbs.asp
Here's a link to the CDO library reference:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deoricdobasics.asp
That's the source, though here's a nice example from w3schools.com:
http://www.w3schools.com/asp/asp_send_email.asp
GoofyDawg
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_clb_sending_a_web_page_by_smtp_mail_using_cdosys_vbs.asp
Here's a link to the CDO library reference:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deoricdobasics.asp
That's the source, though here's a nice example from w3schools.com:
http://www.w3schools.com/asp/asp_send_email.asp
GoofyDawg
ASKER
I tried using it and I get an error and quickie help?
CDO.Message.1 error '80040220'
The "SendUsing" configuration value is invalid.
/toolsprocesses/smartreq_w rite.asp, line 70
It tells me one of the http://scemas is bad?
''************************ *****
'' Send CDOSYS Notification
''************************ *****
Dim iMsg
Set iMsg = Server.CreateObject("CDO.M essage") 'calls CDO message COM object
Dim iConf
Set iConf = Server.CreateObject("CDO.C onfigurati on") 'calls CDO configuration COM object
Dim Flds
Set Flds = iConf.Fields
Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1 'tells cdo we're using the local smtp service
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\inetpub\mailroot\picku p"
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "m0551uspln2.clienteds.ext ad.eds.com "
Flds.Update 'updates CDO's configuration database
iMsg.To = "david.eichler@eds.com, Matt.Pinkston@eds.com"
iMsg.From = temail
iMsg.Subject = "SMART Download Access: requested by: " & request.servervariables("H TTP_CT_REM OTE_USER") & " " & tlname & ", " & tfname
iMsg.TextBody = "Date Opened-" & now & vbnewline & "Contact-" & tlname & ", " & tfname & vbnewline & "Email-" & temail & vbnewline & "Phone-" & tphone & vbnewline & "Business Case-" & tbc
iMsg.Send
CDO.Message.1 error '80040220'
The "SendUsing" configuration value is invalid.
/toolsprocesses/smartreq_w
It tells me one of the http://scemas is bad?
''************************
'' Send CDOSYS Notification
''************************
Dim iMsg
Set iMsg = Server.CreateObject("CDO.M
Dim iConf
Set iConf = Server.CreateObject("CDO.C
Dim Flds
Set Flds = iConf.Fields
Flds("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1 'tells cdo we're using the local smtp service
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:\inetpub\mailroot\picku
Flds("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "m0551uspln2.clienteds.ext
Flds.Update 'updates CDO's configuration database
iMsg.To = "david.eichler@eds.com, Matt.Pinkston@eds.com"
iMsg.From = temail
iMsg.Subject = "SMART Download Access: requested by: " & request.servervariables("H
iMsg.TextBody = "Date Opened-" & now & vbnewline & "Contact-" & tlname & ", " & tfname & vbnewline & "Email-" & temail & vbnewline & "Phone-" & tphone & vbnewline & "Business Case-" & tbc
iMsg.Send
Don't mees with the configursation:
Dim iMsg
Set iMsg = Server.CreateObject("CDO.M essage") 'calls CDO message COM object
iMsg.To = "david.eichler@eds.com, Matt.Pinkston@eds.com"
iMsg.From = temail
iMsg.Subject = "SMART Download Access: requested by: " & request.servervariables("H TTP_CT_REM OTE_USER") & " " & tlname & ", " & tfname
iMsg.TextBody = "Date Opened-" & now & vbnewline & "Contact-" & tlname & ", " & tfname & vbnewline & "Email-" & temail & vbnewline & "Phone-" & tphone & vbnewline & "Business Case-" & tbc
iMsg.Send
Dim iMsg
Set iMsg = Server.CreateObject("CDO.M
iMsg.To = "david.eichler@eds.com, Matt.Pinkston@eds.com"
iMsg.From = temail
iMsg.Subject = "SMART Download Access: requested by: " & request.servervariables("H
iMsg.TextBody = "Date Opened-" & now & vbnewline & "Contact-" & tlname & ", " & tfname & vbnewline & "Email-" & temail & vbnewline & "Phone-" & tphone & vbnewline & "Business Case-" & tbc
iMsg.Send
ASKER
Still getting
CDO.Message.1 error '80040220'
The "SendUsing" configuration value is invalid.
/toolsprocesses/smartreq_w rite.asp, line 79
CDO.Message.1 error '80040220'
The "SendUsing" configuration value is invalid.
/toolsprocesses/smartreq_w
ASKER
All I need is a place that has doc saying what I need to specify all parameters. My CDONTs worked fine but I got moved to a new server and it is no longer supported.
We've provided you plenty of documents and links. Sounds like the problem is you host, and you should contact them...
strage, but... if you tell CDOSYS sendusing = 1 (local smtp) why set the SMTPServer to "m0551uspln2.clienteds.ext ad.eds.com "?
should be localhost or 127.0.0.1 if you need to set it at last?
should be localhost or 127.0.0.1 if you need to set it at last?
oh, and you have to tell the iMsg Object to use the iConf Object:
"iMsg.Configuration = iConf" or "SET iMsg.Configuration = iConf"
"iMsg.Configuration = iConf" or "SET iMsg.Configuration = iConf"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
BTW, you don't necessarily need to specify port 25 exactly with CDO. The assumption that's made when setting "sendusing" to 2 (network) is that port 25 will be used automatically, so you needn't specify. You only need to provide the transport method 1 = sendUsingPickupDirectory, 2 = sendUsingNetwork.
GoofyDawg
GoofyDawg