Error message on Feedback Form code
I have an e-mail feedback form on my website, and when someone clicks the 'send message' button, they're redirected to an error page that says:
Microsoft VBScript runtime error '800a01c2'
Wrong number of arguments or invalid property assignment: 'sendemail'
/contactus.asp, line 22
Here is the code I currently have, the line in red is line 22. Any help would be great!!!
<%
name = request.form("name")
email = request.form("email")
telephone = request.form("telephone")
location = request.form("location")
findus = request.form("findus")
subject = request.form("subject")
comments = request.form("comments")
ok = false
if request.servervariables("REQUEST_METHOD") = "POST" then
if name <> "" and email <> "" and comments <> "" then
emailtext = "Name: " + name + vbcrlf + _
"Email: " + email + vbcrlf + _
"Telephone: " + telephone + vbcrlf + _
"Location: " + location + vbcrlf + _
"Find Us: " + findus + vbcrlf + _
"Subject : " + subject + vbcrlf
emailtext = emailtext + "Comments"+vbcrlf+"-------"+vbcrlf+comments+vbcrlf
'call sendemail("jim@zaks.com","jim@zaks.com","Access Lifts & Ramps Contact Form " + name,emailtext,email)
call sendemail("tperegoy@accessliftsandramps.com", "Access Lifts & Ramps Contact Form " + name,emailtext,email)
call sendemail("brian@zaks.com","Access Lifts & Ramps Contact Form " + name,emailtext,email)
message = "Your message has been sent. Thank you for your input."
ok = true
else
message = "Please fill out all fields"
end if
end if
%>
<%
' For version 1.0
sub sendemail(byval email, byval subj,byref bodytext,from)
'response.write "<P>Sending mail to: " & name & " <" & email & "> ..."
Set Mailer = Server.CreateObject("Persits.MailSender")
Mailer.From = from
Mailer.Host = "mailout.zaks.com"
Mailer.AddAddress email,email
Mailer.Subject = subj
Mailer.Body = bodytext
if Mailer.Send then
'response.write "DONE"
else
'response.write "FAILED<BR>"
'Response.Write "Error encountered: " & Err.Description
end if
end sub
%>
|