SHARE
TWEET

Untitled

a guest Aug 19th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3.  
  4. if((isset($_POST['email']) && strlen($_POST['email']) > 0)){
  5.  
  6.  $nome = addslashes($_POST['name']);  
  7.  $telefone = addslashes($_POST['telefone']);  
  8.  $email = addslashes($_POST['email']);  
  9.  $mensagem = addslashes($_POST['message']);  
  10.  
  11.  $to = "email@gmail.com";  
  12.  $subject = "Contato - Site";
  13.  
  14.  
  15.  
  16.          $body .= "
  17.         Nome: $nome                                
  18.         E-mail: $email
  19.         Telefone: $telefone
  20.         Mensagem: $mensagem";  
  21.  
  22.  
  23.  $header = "From:email@gmail.com"."rn".    
  24.           "Reply-To:".$email."rn".    
  25.           "X=Mailer:PHP/".phpversion();
  26.  
  27.  if (mail($to,$subject,$body,$header)) {
  28.  
  29.      echo("Email enviado com sucesso!");
  30.  
  31.  }else{
  32.      echo("O email não pode ser enviado");
  33.    }
  34.  
  35. }
  36.  
  37.  ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top