home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Templates / Flash / flashmo_109_rectangular / send_email.php < prev   
PHP Script  |  2008-05-26  |  725b  |  24 lines

  1. <?php
  2. $contact_name = $_POST['name'];
  3. $contact_email = $_POST['email'];
  4. $contact_subject = $_POST['subject'];
  5. $contact_message = $_POST['message'];
  6.  
  7. if( $contact_name == true )
  8. {
  9.     $sender = $contact_email;
  10.     $receiver = "info@flashmo.com";
  11.     $client_ip = $_SERVER['REMOTE_ADDR'];
  12.     $email_body = "Name: $contact_name \nEmail: $sender \nSubject: $contact_subject \nMessage: $contact_message \nIP: $client_ip \nFlash Contact Form provided by http://www.flashmo.com";        
  13.     $extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();
  14.  
  15.     if( mail( $receiver, "Flash Contact Form - $subject", $email_body, $extra ) ) 
  16.     {
  17.         echo "success=yes";
  18.     }
  19.     else
  20.     {
  21.         echo "success=no";
  22.     }
  23. }
  24. ?>