View Full Version : Feedback Form

08-04-2011, 08:22 PM
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
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 & " &lt;" & email & "&gt; ..."

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"
'response.write "FAILED<BR>"
'Response.Write "Error encountered: " & Err.Description
end if
end sub

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<title>Access Lifts &amp; Ramps / Home Elevators / Stairlifts / Wheelchair Lifts</title>
<meta name="Description" content="" />
<meta name="Keywords" content="Stair chair, Syracuse, elderly parents, contact, Stairway ramp, dumbwaiter, accessibility, Stair ramp, Rochester, Buffalo, Chair lift, Chair elevator, Porch lift, elder home care, Wheelchair lift, senior home, Vertical lift, Residential elevator, Platform lift, independent seniors, Home elevator, Stair climbers, Upstate NY, Modular ramp systems, Door Operators" />
<link href="../style.css" rel="stylesheet" type="text/css" />
<link href="../js/jquery-ui-1.7.2.custom.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"> // loads jQuery </script>
<script type="text/javascript" src="../js/jquery-ui-1.7.2.custom.min.js"> // for jQuery UI components </script>
<script type="text/javascript" src="../js/hoverIntent.js"> // for navigation </script>
<script type="text/javascript" src="../js/superfish.js"> // for navigation </script>
<script type="text/javascript" src="../js/supersubs.js"> // for navigation </script>
<script type="text/javascript"> // This script is for the navigation menu
minWidth: 12, // minimum width of sub-menus in em units
maxWidth: 27, // maximum width of sub-menus in em units
extraWidth: 1 // extra width can ensure lines don't sometimes turn over
// due to slight rounding differences and font-family
}).superfish(); // call supersubs first, then superfish, so that subs are
// not display:none when measuring. Call before initialising
// containing tabs for same reason.
<script type="text/javascript"> // This script is for the accordion
$(function() {
autoHeight: false,
collapsible: true,
icons: {'header': 'ui-icon-plus', 'headerSelected': 'ui-icon-minus' }
<script type="text/javascript"> // This script is for the tabbed panels
$(function() {

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body {
background-color: #fff;
<div id="header" class="container_12"> <img src="../images/header2Anniversary2.gif" alt="Logo"/></div>
<div id="nav" class="container_12 toprounded">
<ul class="sf-menu">
<li class="first-item"> <li> <a href="index.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> </li>
<!-- apply first-item class to round the menu item corner -->
<li> <a href="aboutus.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;About Us&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>

<li> <a href="ourservice.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Our Service&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> </li>

<li> <a href="#">&nbsp;&nbsp;&nbsp;&nbsp;Media Gallery&nbsp;&nbsp;</a> <ul>
<li><a href="photos.html">Photos</a></li>
<li><a href="videos.html">Videos</a></li>

<li> <a href="#">Resource Center</a>

<li> <a href="articles.html">Articles</a></li>

<li> <a href="links.html">Links</a></li>

<li> <a href="newsletters.html">Newsletters</a></li>


<li> <a href="testimonials.html">&nbsp;&nbsp;&nbsp;Testimonials&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
<li> <a href="contactus.asp">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Contact Us&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></li>
<li> <a href="#"><font color="#FFCC00"><strong>(585) 247-1210</strong></font></a></li>
<div ></div>
<div id="content" class="container_12">
<div class="grid_9 push_3">

<h1>Contact Access Experts</h1>

<div class="form">

<% if message <> "" then %>
<p align="center"><font size="+1"><%=message%></font></p>
<% end if %>
<% if not ok then %>
<form action="contactus.asp" method="post">
<form id="contactform">
<input name="name" type="text" id="name" value="Your Name"> </li>
<input name="email" type="text" id="email" value="Email">
<input name="telephone" type="text" id="telephone" value="Telephone Number">

<input name="location" type="text" id="location" value="City State">
<input name="findus" type="text" id="findus" value="How did you find us ?">

<input name="subject" type="text" id="subject" value="Subject">
<textarea name="comments" id="comments" rows="6" cols="50"></textarea>
<li class="buttons">
<input name="imageField" type="image" class="buttons" id="imageField" value="Send Message" src="../images/send.gif" />
<div class="clr"></div>

08-05-2011, 07:53 PM
This is just a guess, since I don't work in asp, but the line above it was executed just fine. So since the error says that you don't have enough arguments, look at the commented line above, which is the same call:

'call sendemail("jim@zaks.com","jim@zaks.com","Access Lifts & Ramps Contact Form " + name,emailtext,email)

It looks like in your call, you are missing the first or second argument (either fromname or from email). I would try duplicating the email address, and show it like so:

call sendemail("tperegoy@accessliftsandramps.com","tperegoy@accessliftsandramps.com", "Access Lifts & Ramps Contact Form " + name,emailtext,email)

and see if that works.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum