Link to home
Start Free TrialLog in
Avatar of TrueBlue
TrueBlueFlag for United States of America

asked on

syntax error in vbscipt

Hello.

I am getting the following error from the below listed vbscript.

Microsoft VBScript compilation error '800a03ea'

Syntax error

/ccrf.asp, line 13

& "<html>" & _
^

Any ideas?

<% If "" & Request("EmailAddress") <> "" Then
    Set oMailer = Server.CreateObject("Persits.MailSender")
    oMailer.Host = "mail.xyz.com" 'specify valid SMTP host
    oMailer.From = Request("EmailAddress") 'specify senders address
    oMailer.FromName = Request("Name") 'specify senders name
    oMailer.AddAddress "sales@xyz.com"  
    oMailer.AddCC "techserv@xyz.com"
    oMailer.AddCustomHeader "Return-Receipt-To: <techserv@xyz.com>"
    oMailer.AddCustomHeader "Disposition-Notification-To: <techserv@xyz.com>"  
    oMailer.Subject = "Automatic Credit Card Request Form"
    'Build message body
         strBody = "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">" & _
               & "<html>" & _
               & "<head>" & _
          & "<title>" & "Automatic Credit Card Request Form" & "</title>" & "<BR>" _
               & "<meta http-equiv=Content-Type content=""text/html; charset=iso-8859-1"">" & _
          & "</head>" & _
          & "<body bgcolor=""#FFFF99"">" & _
          & "<h2>" & "Automatic Credit Card Request Form" & "</h2>" & _
          & " <p>" & _
        & "IP Address: " & Request.ServerVariables("REMOTE_HOST") & "<BR>" _
        & "Account Number: " & Request("AccountNumber") & "<BR>" _
        & "Card Type: " & Request("CardType") & "<BR>" _
        & "Card Number: " & Request("CreditCardNumber") & "<BR>" _
        & "ExpirationDate: " & Request("ExpirationDate") & "<BR>" _
        & "V Code: " & Request("VCode") & "<BR>" _
        & "Message: " & Request("Message") & "<BR>" _
             & "</body>" & "<BR>" _
             & "</html>" & "<BR>"

    oMailer.Body = strBody ' assign string to Mail.Body
    oMailer.IsHTML = true
    On Error Resume Next
    Call oMailer.Send()
    Set oMailer = Nothing
    Response.Redirect("thankyou.htm")
    If Err <> 0 Then
      Response.Write "Error encountered: " & Err.Description
    End If
      Else %>
 <script language="JavaScript" type="text/javascript">javascript: window.history.back(-1)</script>
<% End IF %>
ASKER CERTIFIED SOLUTION
Avatar of NeoTeq
NeoTeq

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Zamba1
Zamba1

Just remove the ampersands (&) and the beginning of the line, since it is continued from the previous line and you would have two ampersands otherwise, which is not allowed.
That's what I said...