why doesn't this code work? (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


Eli -> why doesn't this code work? (11/9/2001 20:37:00)

anyone any ideas why this asp code doesn't work - comes back with line 22 "Recipents undefined"

<% @LANGUAGE = VBScript %>
<% Option Explicit %>
<html>
<head>
<title>Client Questionaire</title>
</head>
<body bgcolor=#ffffff>
<%
Dim strName, strEmail, strQuery
strName = Trim(Request.Form("ClientName"))
strEmail = Trim(Request.Form("ClientEmail"))
strQuery = Trim(Request.Form("ClientQry"))

If (strName <> "" And strEmail <> "" And strQuery <> "") Then
Dim objMail, aReceipents
Set objMail = Server.CreateObject("CDONTS.NewMail")

objMail.From = "email address here"
objMail.To = strEmail
objMail.Subject = "Your Inquiry " & strName

aRecipients = Array("email address here", _
"email address here")

objMail.BCC = Join(aRecipients, ";")
objMail.Body = strQuery
objMail.Send

Response.Write "Thank you for your comment!"

Set objMail = Nothing
Else
%>

<h1>Enter your review</h1>

<FORM ACTION="<%=Request.ServerVariables("SCRIPT_NAME")%>" METHOD=POST>
<TABLE BORDER=0>
<tr><td>Name</td><td><INPUT TYPE=TEXT NAME="ClientName" VALUE="" SIZE=40></td></tr>
<tr><td>EMail address</td><td><INPUT TYPE=TEXT NAME="ClientEmail" VALUE="" SIZE=40></td></tr>
<tr><td valign=top>Comment/Question</td><td><TEXTAREA NAME="ClientQry" COLS=40 ROWS=10></TEXTAREA></td></tr>
<tr><td></td><td><INPUT TYPE=SUBMIT VALUE="Submit"></td></tr>
</TABLE>
</FORM>

<% End If %>

</body>

</html>





Stuey -> RE: why doesn't this code work? (11/9/2001 20:25:00)

You spelt recipients about three different ways check your spelling you have coders blindness

Stuart

------------------
Stuart Steele
stuart@stuweb.co.uk
http://www.stuweb.co.uk





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875