Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Aug 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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
    %>

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,231
    Thanks
    80
    Thanked 4,456 Times in 4,421 Posts
    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?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •