Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. $recipient = "example@test.xom";
  2.  
  3.  
  4. $subject = "$aanvraag - $naam $voornaam";
  5.  
  6. // Build the email content.
  7. $email_content = "Hey!nn";
  8. $email_content .= "Gevevens:n$naam $voornaamn$straat, $postcode $stadn$email, $phonen$reknrnn";
  9. $email_content .= "Voertuig(en nummerplaat): $wagenn";
  10. $email_content .= "Opties: $optien";
  11. $email_content .= "Afhaalpunt: $afhaalpuntn";
  12. $email_content .= "Terugbrengpunt: $terugbrengpuntnn";
  13. $email_content .= "Start huur: $datumvann";
  14. $email_content .= "Einde huur: $datumtotn";
  15. $email_content .= "Eventuele btw-nummer: $btwnrn";
  16. $email_content .= "$aanvraagn";
  17.  
  18. // Build the email headers.
  19. $email_headers = "From: $naam $voornaam <$email>";
  20.  
  21. // Send the email.
  22. if (mail($recipient, $subject, $email_content, $email_headers)) {
  23. // Set a 200 (okay) response code.
  24. http_response_code(200);
  25. header("location:contact.php?verzonden=true");
  26. exit();
  27. } else {
  28. // Set a 500 (internal server error) response code.
  29. http_response_code(500);
  30. header("location:contact.php?verzonden=not");
  31. exit();
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement