Advertisement

09.05.2008 at 03:08AM PDT, ID: 23705609 | Points: 500
[x]
Attachment Details

my asp form handler is giving an error message

Asked by jonsmithgraphics in Active Server Pages (ASP)

hello,
i have a form that uses an asp handler. when I click submit, I get an error message:

error '8004020f'

asp code below any ideas what i have done wrong? I know this error refers to connecting (or not) to the server but i have double checked the smtp details and they are correct.

thanks!

jonStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
<html>
 
 
<body>
 
<%
Const cdoSendUsingMethod        = _
	"http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort          = 2
Const cdoSMTPServer             = _
	"http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort         = _
	"http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPConnectionTimeout  = _
	"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
Const cdoSMTPAuthenticate       = _
	"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic                  = 1
Const cdoSendUserName           = _
	"http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword           = _
	"http://schemas.microsoft.com/cdo/configuration/sendpassword"
 
Dim objConfig  ' As CDO.Configuration
Dim objMessage ' As CDO.Message
Dim Fields     ' As ADODB.Fields
Dim fname, course, email, tel_no, enquiry, keepUpToDate
 
 
fname = Request.Form("fname")
course = Request.Form("course")
email = Request.Form("email")
tel_no = Request.Form("tel_no")
enquiry = Request.Form("enquiry")
keepUpToDate = Request.Form("keepUpToDate")
 
' Get a handle on the config object and it's fields
Set objConfig = Server.CreateObject("CDO.Configuration")
Set Fields = objConfig.Fields
 
' Set config fields we care about
With Fields
	.Item(cdoSendUsingMethod)       = cdoSendUsingPort
	.Item(cdoSMTPServer)            = "assist-sql1.assist.local"
	.Item(cdoSMTPServerPort)        = 25
	.Item(cdoSMTPConnectionTimeout) = 10
	.Item(cdoSMTPAuthenticate)      = cdoBasic
	.Item(cdoSendUserName)          = "USERNAME"
	.Item(cdoSendPassword)          = "PASSWORD"
 
	.Update
End With
 
Set objMessage = Server.CreateObject("CDO.Message")
 
Set objMessage.Configuration = objConfig
 
With objMessage
	.To       = "info@assistsupport.co.uk, hello@jonsmithgraphics.co.uk"
	.From     = "info@assistsupport.co.uk"
	.Subject  = "Assist Academy Web Enquiry" 
	.TextBody = "Assist Academy Web Enquiry Sent @ " & Now() & vbCrLf & "fname: " & fname & vbCrLf & "course: " & course & vbCrLf & "email: " & email & vbCrLf & "tel_no: " & tel_no & vbCrLf  & "enquiry: " & enquiry & vbCrLf & "keepUpToDate: " & keepUpToDate
 
	.Send
End With
 
Set Fields = Nothing
Set objMessage = Nothing
Set objConfig = Nothing
 
Response.Redirect "thanks-academy2.html"
%>
 
</body>
</html>
 
 
[+][-]09.05.2008 at 05:39AM PDT, ID: 22398056

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 05:54AM PDT, ID: 22398237

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 06:06AM PDT, ID: 22398357

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 06:07AM PDT, ID: 22398365

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 06:15AM PDT, ID: 22398476

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 06:19AM PDT, ID: 22398531

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 06:23AM PDT, ID: 22398570

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 06:24AM PDT, ID: 22398573

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 06:25AM PDT, ID: 22398592

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 06:30AM PDT, ID: 22398659

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 06:43AM PDT, ID: 22398803

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 06:56AM PDT, ID: 22398935

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.05.2008 at 07:10AM PDT, ID: 22399102

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628