flash data integration:
Im sorry if this question is stupid but i am very new to AS and ASP and this is the issue im having. I created a form in flash that passes info to asp and that info is supposed to be sent via email. I am getting this error in asp when i submit the form "errors503 Bad sequence of commands" Now from what i have found from the net that is a SMTP error but i dont know what is causing it. Here is the AS and ASP code i am using. Thanks in advance, Nate function onSubmit() { // Create a new LoadVars instance for the form data formData = new LoadVars(); // Initialize formData variables: formData.customerName_ti = ""; formData.email_ti = ""; formData.workOrder_ti = ""; formData.hearAbout_cb = ""; formData.radioGroup1 = ""; formData.radioGroup2 = ""; formData.radioGroup3 = ""; formData.radioGroup4 = ""; formData.radioGroup5 = ""; formData.radioGroup6 = ""; formData.radioGroup7 = ""; formData.radioGroup8 = ""; formData.radioGroup9 = ""; formData.radioGroup10 = ""; formData.radioGroup11= ""; formData.radioGroup12 = ""; formData.radioGroup13 = ""; formData.radioGroup14 = ""; formData.radioGroup15 = ""; formData.comments_ta = ""; // Gather the order information into a LoadVars instance. formData.customerName_ti = customerName_ti.getValue(); formData.email_ti = email_ti.getValue(); formData.workOrder_ti = workOrder_ti.getValue(); formData.hearAbout_cb = hearAbout_cb.getValue(); formData.radioGroup1 = radioGroup1.getValue(); formData.radioGroup2 = radioGroup2.getValue(); formData.radioGroup3 = radioGroup3.getValue(); formData.radioGroup4 = radioGroup4.getValue(); formData.radioGroup5 = radioGroup5.getValue(); formData.radioGroup6 = radioGroup6.getValue(); formData.radioGroup7 = radioGroup7.getValue(); formData.radioGroup8 = radioGroup8.getValue(); formData.radioGroup9 = radioGroup9.getValue(); formData.radioGroup10 = radioGroup10.getValue(); formData.radioGroup11 = radioGroup11.getValue(); formData.radioGroup12 = radioGroup12.getValue(); formData.radioGroup13 = radioGroup13.getValue(); formData.radioGroup14 = radioGroup14.getValue(); formData.radioGroup15 = radioGroup15.getValue(); formData.comment_ta = comment_ta.getValue(); //This Function sends the info to ASP // Submit the order data formData.send("questionnaire.asp", "_blank", "POST"); } -------------------------------------------------------------------------------- ------------------ <% customerName = Request.form("customerName_ti") email = Request.form("email_ti") workOrder = Request.form("workOrder_ti") hearAbout = Request.form("hearAbout_cb") radioGroup1 = Request.form("radioGroup1") radioGroup2 = Request.form("radioGroup2") radioGroup3 = Request.form("radioGroup3") radioGroup4 = Request.form("radioGroup4") radioGroup5 = Request.form("radioGroup5") radioGroup6 = Request.form("radioGroup6") radioGroup7 = Request.form("radioGroup7") radioGroup8 = Request.form("radioGroup8") radioGroup9 = Request.form("radioGroup9") radioGroup10 = Request.form("radioGroup10") radioGroup11 = Request.form("radioGroup11") radioGroup12 = Request.form("radioGroup12") radioGroup13 = Request.form("radioGroup13") radioGroup14 = Request.form("radioGroup14") radioGroup15 = Request.form("radioGroup15") comments = Request.form("comments_ta") strName = "My name" strEmail = "myemail@mycompany.com" I use a valid email address here, just removed for this post. strSubject = "Online Questionnaire" strBody = workOrder & hearAbout & radioGroup1 & radioGroup2 & radioGroup3 & radioGroup4 & radioGroup5 & radioGroup6 & radioGroup7 & radioGroup8 & radioGroup9 & radioGroup10 & radioGroup11 & radioGroup12 & radioGroup13 & radioGroup14 & radioGroup15 & comments Set Mailer = Server.CreateObject("SMTPsvg.Mailer") Mailer.FromName = customerName Mailer.FromAddress = email Mailer.AddRecipient strName, strEmail Mailer.Subject = (strSubject) Mailer.BodyText = strBody Mailer.RemoteHost = "mail-fwd" if Mailer.SendMail then Response.Write "_root.Mail.EmailStatus=Complete - Your mail has been sent" else Response.Write "_root.Mail.EmailStatus=Failure - Your mail was not sent - errors" Response.Write Mailer.Response Set Mailer = Nothing end if %>
I don't have time to debug yours, but here is something that I have used in the asp page before that you might try. Mathias <%@ LANGUAGE="VBSCRIPT" %> <html> <head> <meta HTTP-EQUIV="Content-Type" content="text/html;charset=iso-8859-1"> <title>CDONTSMail</title> <% Sub Write(strWriteThis) 'This subroutine just writes out whatever is 'passed to it. response.write(strWriteThis & "<br>") end sub %> </head> <body> <% Dim myCDONTSMail Dim strFrom Dim strTo Dim strSubject Dim strMessage Dim lngImportance 'The following variable assignments are not required 'they are just here to make interpretation of the 'myCDONTSMail.Send line easier. You could put the 'Request.Form statements in the .Send line to cut down 'on the amount of code in the file. strFrom="FromName@FromAddress.com" strTo="ToName@ToAddress.com" strSubject = "Put The Subject Here" strBody="Name: " & request.form("txtName") & CHR(13) & "E-Mail: " & request.form("txtEmail") & CHR(13) & "Phone: " & request.form("txtPhone") 'lngImportance = request.form("optImportance") 'The following four lines of code are just here for test 'purposes to see what variables have been pulled in from the 'HTM form. 'Write("strFrom = " & strFrom) 'Write("strTo = " & strTo) 'Write("strSubject = " & strSubject) 'Write("strMessage = " & strBody) 'Write("Importance = " & lngImportance) Set myCDONTSMail = CreateObject("CDONTS.NewMail") myCDONTSMail.Send strFrom,strTo,strSubject,strBody Set myCDONTSMail = Nothing 'Write "Mail has been sent." %> </body> </html>
Sorry, meant to add more: You can see that I am getting the fields passed in by using request.form request.form("txtName") request.form("txtEmail") request.form("txtPhone")
Don't see what you're looking for? Try a search.
|