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
Edited by God_Struth