Advertisement
Guest User

Untitled

a guest
May 5th, 2011
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.99 KB | None | 0 0
  1. <?php
  2.  
  3. if ($_POST[nome] != "" && $_POST[cognome] != ""){  
  4.                 //costruisce il corpo della mail
  5.                 $body = "";
  6.                 foreach($HTTP_POST_VARS as $key => $value){
  7.                               $body = $body.$key.": ".$value."\r\n";        
  8.                 }
  9.                                
  10. $testoMail = "Email inviata dal sito http://www.lenciabbigliamento.it \n\r
  11.  
  12. $body\r\n
  13.  
  14. ";
  15.                 $test = @mail("origin.of@gmail.com","Contatto dal sito http://www.lenciabbigliamento.it ",$testoMail,
  16.                                                                "From: $_POST[email]\r\n" .
  17.                                                                "Reply-To: $_POST[email]\r\n" .
  18.                                                                "X-Mailer: Space New SRL/" . phpversion());
  19.                                                
  20.                 if($test)
  21.                    echo "ok";
  22.                 else
  23.                   echo "non ok";
  24. }
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement