1 Reply Latest reply on Nov 15, 2006 8:14 AM by kglad

    Problems receiving variables...

    123445667789
      Hi,

      I'm wondering if anyone can be of some assistance, I'm trying to upload a flash site
      that contains a contact page with three fields people can enter there details into:
      Name, Email & Message. Now we've written some script so that the page shows
      a message to user saying that 'email sending is in progess', so there aware
      something has happened!

      Everything seems to be fine, message appears when sending, all details are sent
      /received both locally and on our test sever, but when we upload our site to
      the hosted UNIX environment, for some reason we stop receiving any messages
      that have been written into the field. We only receive the person's name and e-mail
      address with an empty e-mail.

      When all that is being changed within our Flash is the variables address...

      Does this sound familiar to anybody? anybody have any ideas as to how this maybe
      remedied? A Big pre-thanks to anybody that might be able to help!!!

      Below is the flash code:

      --------------//----------------

      on(rollOver){
      this.gotoAndPlay("s1");
      }
      on(rollOut, releaseOutside){
      this.gotoAndPlay("s2");
      }
      on (press)
      {
      // send variables in form (the textfields)
      // add to the end of message the details of the name
      _parent.t4_2 = _parent.t4_2 + " By " + _parent.t2_2
      // to email asp page which will send the mail
      _parent.loadVariables("cust-bin/mailtest.pl?action=Send", "POST");
      _parent.t2_2 ="Email";
      _parent.t3_2 ="Sending";
      _parent.t4_2 = "In Progress";
      }
      on (release) {


      //pause for a few seconds
      var i:Number
      var p:Number
      for (y=0; y<500000; y++)
      {
      p++;
      }
      _parent.t1_2="";
      _parent.t2_2="Your Name:";
      _parent.t3_2="Your E-mail:";
      _parent.t4_2="Message:";
      }

      --------------//----------------

      This works fine until we change the load-variables address to our "sendmail2.asp"
      Below the sendmail2.asp which is also working fine.

      --------------//----------------

      <%
      ' Put your SMTP Mail server here. If you do not know, ask your network administrator
      smtpServer = "217.170.190.152"
      smtpPort = 25

      ' ---
      dim smtpServer, smtpPort


      Set message = CreateObject ("JMail.Message")
      'message.ServerAddress = smtpServer & ":" & smtpPort
      message.From = Request.Form("t3_2")
      message.FromName = Request.Form("t2_2")
      message.Subject = "Web Site Enquiry"
      message.AddRecipient "richard@lanworks.co.uk", "Richard"
      message.ContentType = "text/html" ' or you can put 'text/plain' for plain text emessage
      message.ISOEncodeHeaders = false
      message.ContentTransferEncoding = "8bit"
      message.Body = Request.Form("t4_2") & vbnewline & "From : " & Request.Form("t2_2")

      ' 1 - highest priority (Urgent) ' 3 - normal ' 5 - lowest
      message.Priority = 3


      ' Add sender's IP address (not required, but useful for web-based emessage)
      'message.AddHeader "Originating-IP", Request.ServerVariables ("REMOTE_ADDR")

      'Send the e-mail
      message.Send(smtpServer & ":" & smtpPort)
      Response.write "success=1&timeDate=" & Server.URLEncode(message.Date) & "&end=1"
      set message = nothing
      %>

      --------------//----------------

      Hope someone can help!!
      Thanks you!

      Si
        • 1. Re: Problems receiving variables...
          kglad Adobe Community Professional & MVP
          you have two errors, unless you're using an older version of flash, in which case you have one.

          you can resolve both by NOT changing your variables' values BEFORE they are received by your php script and removing that for-loop which is inappropriate to use as a timing device.

          if you must use the same textfields to give feedback to your user (that the message is being sent) then assign 3 other variables to contain the values of your textfield variables BEFORE the textfield variables are changed to give feedback (and change your php script accordingly).