Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-04-2011, 09:18 PM   PM User | #1
access1
New to the CF scene

 
Join Date: Aug 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
access1 is an unknown quantity at this point
Exclamation 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 & " &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"
else
'response.write "FAILED<BR>"
'Response.Write "Error encountered: " & Err.Description
end if
end sub
%>
access1 is offline   Reply With Quote
Old 08-05-2011, 03:10 AM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,162
Thanks: 59
Thanked 3,992 Times in 3,961 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
I sure don't see it.

I don't have the Persits mailer, so I got an error when it tried to create that object, but it worked up to there.

I can't help but wonder if maybe it has something to do with that one BYREF argument. Try removing the BYREF keyword and see if that makes a difference.

I'm assuming that you are showing us 100% of the code on the page????

You aren't omitting anything, at all?
Old Pedant is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:12 PM.


Advertisement
Log in to turn off these ads.