Guest User

Untitled

a guest
Jun 18th, 2018
435
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. <?php
  2.  
  3. $fullName = $_POST['fullName'];
  4. $email_from = $_POST['mail'];
  5. $phone = $_POST['phone'];
  6. $city = $_POST['city'];
  7. $projectWanted = $_POST['projectWanted'];
  8. $message = $_POST['message'];
  9. $projectMail = $_POST['projectMail'];
  10.  
  11. $emailTo = "adrianarojasventas@hotmail.com, " . $projectMail;
  12.  
  13. $subject = "Contacto Web Constructora Capital"; //asunto
  14.  
  15. //direccion del remitente
  16. $headers = "From: " . $fullName . " <" . $email_from . ">";
  17.  
  18. $mailMessage = "
  19. Buen dia:
  20. Se ha generado para usted, un mensaje por parte de un cliente.
  21.  
  22. Nombre: $fullName
  23. E-Mail: $mail
  24. Telefono: $phone
  25. Ciudad: $city
  26. Proyecto Consultado: $projectWanted
  27. Comentario: $message";
  28.  
  29. $result = "<result>FAIL</result>";
  30.  
  31. if (mail($emailTo, $subject, $mailMessage, $headers)) {
  32. $result = "<result>OK</result>";
  33. }
  34.  
  35. print ($result);
  36. ?>
Add Comment
Please, Sign In to add comment