TehLibrarian
04-11-2007, 04:18 PM
I'm getting a
Microsoft VBScript compilation error '800a03ea'
Syntax error
/form_response.asp, line 40
MSG = "mail was not sent successfully"<br>
------------------------------------------^
error with my form. My ASP knowledge is extremely basic and I think I might be missing punctuation somewhere. Any help would be greatly appreciated. Heres the code:
<%
my_from=request("mail-fromName")
my_fromAddress=request("mail-fromaddress")
my_to=request("mail-toName")
my_toAddress=request("mail-toaddress")
my_subject=request("mail-subject")
my_relay=request("mail-relay")
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = my_relay
Mailer.FromName = my_from
Mailer.FromAddress = my_fromAddress
Mailer.AddRecipient my_to, my_toaddress
Mailer.Subject = my_subject
sBodyText = "The following is feedback from my web site." & vbcrlf & vbcrlf
sBodyText = sBodyText & "First Name: " & Request.Form("firstname") & vbCrLf
sBodyText = sBodyText & "Last Name: " & Request.Form("lastname") & vbCrLf
sBodyText = sBodyText & "Company: " & Request.Form("company") & vbCrLf
sBodyText = sBodyText & "E-Mail Address: " & Request.Form("email")
sBodyText = sBodyText & vbCrLf & Chr(13) & Chr(10) & Chr(13) & Chr(10)
sBodyText = sBodyText & "" & Request.Form("feedback") & vbCrLf
sBodyText = sBodyText & "" & Request.Form("comment") & vbCrLf
Mailer.BodyText = sBodyText
If Mailer.SendMail then
Msg = "Thank you for your enquiry.<br> A member of staff will contact you shortly."
Else
MSG = "mail was not sent successfully"<br>
MSG = MS G& mailer.response & "<br>"
End If
response.write MSG
%>
Microsoft VBScript compilation error '800a03ea'
Syntax error
/form_response.asp, line 40
MSG = "mail was not sent successfully"<br>
------------------------------------------^
error with my form. My ASP knowledge is extremely basic and I think I might be missing punctuation somewhere. Any help would be greatly appreciated. Heres the code:
<%
my_from=request("mail-fromName")
my_fromAddress=request("mail-fromaddress")
my_to=request("mail-toName")
my_toAddress=request("mail-toaddress")
my_subject=request("mail-subject")
my_relay=request("mail-relay")
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.RemoteHost = my_relay
Mailer.FromName = my_from
Mailer.FromAddress = my_fromAddress
Mailer.AddRecipient my_to, my_toaddress
Mailer.Subject = my_subject
sBodyText = "The following is feedback from my web site." & vbcrlf & vbcrlf
sBodyText = sBodyText & "First Name: " & Request.Form("firstname") & vbCrLf
sBodyText = sBodyText & "Last Name: " & Request.Form("lastname") & vbCrLf
sBodyText = sBodyText & "Company: " & Request.Form("company") & vbCrLf
sBodyText = sBodyText & "E-Mail Address: " & Request.Form("email")
sBodyText = sBodyText & vbCrLf & Chr(13) & Chr(10) & Chr(13) & Chr(10)
sBodyText = sBodyText & "" & Request.Form("feedback") & vbCrLf
sBodyText = sBodyText & "" & Request.Form("comment") & vbCrLf
Mailer.BodyText = sBodyText
If Mailer.SendMail then
Msg = "Thank you for your enquiry.<br> A member of staff will contact you shortly."
Else
MSG = "mail was not sent successfully"<br>
MSG = MS G& mailer.response & "<br>"
End If
response.write MSG
%>