Guest User

Untitled

a guest
Apr 26th, 2018
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4.  
  5. //create short variable names
  6. $nombre = $_POST['nombre'];
  7. $compania = $_POST['compania'];
  8. $telefono = $_POST['telefono'];
  9. $email = $_POST['email'];
  10. $message = $_POST['mess'];
  11.  
  12.  
  13. //make sure there is content
  14.  
  15. if ($nombre=="")
  16. {
  17. echo "&returnmsg= Su Nombre nos Interesa.";
  18. $wasSent =0;
  19. echo "&mailed=".$wasSent;
  20. exit;
  21. }
  22.  
  23. if ($email=="")
  24. {
  25. echo "&returnmsg=".$clientName."Su mail nos Interesa.";
  26. $wasSent =0;
  27. echo "&mailed=".$wasSent;
  28. exit;
  29. }
  30.  
  31. if ($message=="")
  32. {
  33. echo "&returnmsg=".$clientName."Porfavor escriba su Mensaje.";
  34. $wasSent =0;
  35. echo "&mailed=".$wasSent;
  36. exit;
  37. }
  38.  
  39.  
  40.  
  41. //set up send mail
  42.  
  43. //enter you email address here
  44. $sendMail = "dgluiss@designomexico.com";
  45. //enter your subject
  46. $sub = "Contacto Marcavision Web";
  47. //this receives the message from the ActionScript
  48. $inquiry = $message;
  49. $extra = "From: $email\r\nReply-To: $email\r\n";
  50.  
  51. mail($sendMail,$sub,$inquiry,$extra);
  52. //set up variable to let AS know that the mail was sent successfully
  53. $wasSent = 1;
  54. echo "&mailed=".$wasSent;
  55. echo "&returnmsg=Gracias ".$clientName.". Your mail has been sent.";
  56.  
  57.  
  58.  
  59. ?>
Add Comment
Please, Sign In to add comment