I’ve been building this email contact form in Flash and testing various asp scripts. I’ve got one working but for some reason the body of the email won’t appear. I’ve been playing around with this all day and looking at similar asp scripts. The syntax looks okay and the AS is fine. the asp script is as follows:
<%
dim fromEmail, toEmail, thesubject, themessage, i
'Gets the incoming variables from flash
fromEmail = Request.form("fromEmail_txt")
'toEmail = Request.form("toEmail_txt")
'thesubject = Request.form("subject_txt")
firmname = Request.form("firmName_txt")
checkin = Request.form("checkIn_txt")
'strName = "Gerry Mooney"
strEmail = "gmooney@visualexllc.com"
strSubject = "LegalPads Reservation Request"
strBody = firmname & checkin
'Declare and create email object
dim objmail
set objmail = Server.CreateObject("CDO.Message")
'error handler, if error encountered, ignore it and proceed
On Error resume next
'build the email using the variables from flash
objmail.From = fromEmail
objmail.To = (strEmail)
objmail.Subject = (strSubject)
objmail.Body = strBody
objmail.Send
'error handler, if error encountered, ignore it and proceed
On Error resume next
'If any errors were encounter then run this code
If Err.Number <> 0 then
'tells flash ASP failed and terminates the ASP file.
Response.Write "&server_mes=fail"
Response.End
else
'Send message back to flash saying everything was ok.
Response.Write "&server_mes=ok"
End if
%>