Cdosys Help Please
Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=6894
Printed Date: 31 March 2026 at 1:54pm Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: Cdosys Help Please
Posted By: God_Struth
Subject: Cdosys Help Please
Date Posted: 31 October 2003 at 6:22pm
Would appreciate if someone could tell me why I keep getting an error with this script trying to send a cdosys email from a form.
'Expected End of Statement' is the error message at the blue line.
<%
Dim objCDOSYSCon
Set objCDOSYSMail = Server.CreateObject("CDO.Message")
Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")
'Set and update fields properties
With objCDOSYSCon
'Out going SMTP server
.Fields("http://sc hemas.micros oft.com/cdo/configuration/smtpserver") = "mail.myserver.co.uk"
'SMTP port
.Fields("http://sc hemas.micros oft.com/cdo/configuration/smtpserverport") = 25
'CDO Port
.Fields("http://sc hemas.micros oft.com/cdo/configuration/sendusing") = 2
'Timeout
.Fields("http://sc hemas.micros oft.com/cdo/configuration/smtpconnectiontimeout") = 60
&nbs p; .Fields.Update
End With &n bsp;
Set objCDOSYSMail.Configuration = objCDOSYSCon
With objCDOSYSMail
'Who the e-mail is from
objCDOSYSMail.From = request.form("clname")
objCDOSYSMail.To = "me@myplace.co.uk"
'The subject of the e-mail
objCDOSYSMail.Subject =request.form("clsubject")
objCDOSYSMail.TextBody =request.form("clbod")
'Send the e-mail
objCDOSYSMail.Send
Set objCDOSYSMail = Nothing
Set objCDOSYSCon = Nothing
Response.Redirect ("../thanks.asp")
%> |
I know this sort of stuff is simple, but its late and I am needing sleep
------------- "I'm only trying to help......"
|
Replies:
Posted By: dpyers
Date Posted: 31 October 2003 at 7:24pm
End With
-------------
Lead me not into temptation... I know the short cut, follow me.
|
Posted By: God_Struth
Date Posted: 31 October 2003 at 8:24pm
Thanks dpyers, hopefully thats my brain fart of the week out the road
------------- "I'm only trying to help......"
|
Posted By: dpyers
Date Posted: 31 October 2003 at 9:40pm
Only caught it because I'm so familiar with it.
-------------
Lead me not into temptation... I know the short cut, follow me.
|
|