1 Reply Latest reply on Apr 23, 2007 6:49 AM by MotionMaker

    problem in sending email

    Heart2Soul
      Hi
      I have a site made on flash and i am having problem send email
      the site is http://www.humanrecruit.com

      when i go on contact and submit the feed back which is a flash form
      i get an error

      Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in d:\hshome\abdalla1\humanrecruit.com\contact.php on line 37
      =======================================

      Can you please help me with this coding so i can send it message to my email
      i am not good in .php
      Please help me in brief

      Thanking you
        • 1. Re: problem in sending email
          MotionMaker Level 1
          1. I do not see any Actionscript code posted that indicates how the PHP script is called.
          2. From the PHP code it looks like you are using URL encoded data to receive. Therefore we should be seeing your Actionscript code that contains LoadVars.sendAndLoad.
          3. The error you are receiving has to do with PHP and your mail server configuration. You may find someone in the Flash forum with experience on this, but your web hosting company or a PHP forum is where to go for answers on that error.
          4. When writing PHP with Flash the PHP does not have any HTML tags or white space such as tabs, returns or spaces before or after the opening and closing PHP tags. In other words PHP only returns data. For example it might echo "&emailsent=true"; or echo "&emailsent=false"; Then your Flash movie would display an appropriate screen based on the value of the emailsent variable. You could also return a message for Flash to return from PHP but this is all a matter of design as to what the client and the server is supposed to do in the application. Ex: echo "&emailsent=true&message=Your message was sent"; or echo "&emailsent=false&message=Your message was not sent";
          5. You can debug the PHP script without Flash. Create an HTML form and include the needed variables to send to the PHP script in the form. Then hit the submit button. Debug the PHP coding errors. Once the PHP script works then check the URL variables that are returned so you know Flash will receive the data it needs to work. Once you have the PHP script working, then you can take on the Flash programming.

          Remember your PHP script only returns URL encoded variables and that is the echo statement with the pattern
          &var1=value&var2=value&var3=value in one or multiple echo or print statements.