0 Replies Latest reply on Oct 13, 2006 2:37 PM by deKolonel

    Mailing a form

    deKolonel
      Hi,

      I have these to pieces of code

      sendmail.php:



      <?php

      $message = "
      Start date: $start_date \n
      From: $requestor\n
      Manager/Owner : $manager_owner \n
      Manager/Owner E-mail : $manager_owner_email \n
      Description : $description \n
      ";

      $description = stripcslashes($description);


      mail($mailto, $subject, $message, $headers);

      ?>



      and a mxml:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" xmlns="*" layout="absolute" creationComplete="userRequest.send()">
      <mx:DateFormatter id="dfconv" formatString="DD/MM/YYYY"/>
      <mx:Script>
      <![CDATA[
      private function formatDate(date:Date):String
      {
      return dfconv.format(date);
      }
      ]]>
      </mx:Script>

      <mx:HTTPService
      id="userRequest"
      url=" http://www.witte-raaf.be/newuser/sendmail.php"
      useProxy="false"
      method="POST">
      </mx:HTTPService>
      <mx:Form x="22" y="10" width="493">
      <mx:HBox>
      <mx:Label text="Mail to:"/>
      <mx:TextInput id="mailto" text="mail@address.com"/>
      </mx:HBox>
      <mx:HBox>
      <mx:Label text="Subject:"/>
      <mx:TextInput id="subject" text="REQ: New user"/>
      </mx:HBox>
      <mx:HBox>
      <mx:Label text="Requestor Name:"/>
      <mx:TextInput id="requestor"/>
      </mx:HBox>
      <mx:FormItem label="Start Date:">
      <mx:DateField id="start_date" labelFunction="formatDate" parseFunction="null"/>
      </mx:FormItem>
      <mx:HBox>
      <mx:Label text="Manager / Owner:"/>
      <mx:TextInput id="manager_owner"/>
      </mx:HBox>
      <mx:HBox>
      <mx:Label text="Manager / Owner E-mail:"/>
      <mx:TextInput id="manager_owner_email"/>
      </mx:HBox>
      <mx:HBox>
      <mx:Label text="If Shared or Process give Description:"/>
      <mx:TextInput id="description"/>
      </mx:HBox>
      <mx:Button label="Submit" click="userRequest.send()"/>
      </mx:Form>
      </mx:Application>


      What I want to do is to em-mail the data entered in the form to an e-mail address (the mail@address.com is ficticious).

      For some reason I can't get the data parsed.

      I have to say that i am a bit of a newbie, but willing to learn.

      PLease help me to get this right. Step one is to just get the data e-mailed