contact_process.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. $to = "spn8@spondonit.com";
  3. $from = $_REQUEST['email'];
  4. $name = $_REQUEST['name'];
  5. $subject = $_REQUEST['subject'];
  6. $number = $_REQUEST['number'];
  7. $cmessage = $_REQUEST['message'];
  8. $headers = "From: $from";
  9. $headers = "From: " . $from . "\r\n";
  10. $headers .= "Reply-To: ". $from . "\r\n";
  11. $headers .= "MIME-Version: 1.0\r\n";
  12. $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
  13. $subject = "You have a message from your Bitmap Photography.";
  14. $logo = 'img/logo.png';
  15. $link = '#';
  16. $body = "<!DOCTYPE html><html lang='en'><head><meta charset='UTF-8'><title>Express Mail</title></head><body>";
  17. $body .= "<table style='width: 100%;'>";
  18. $body .= "<thead style='text-align: center;'><tr><td style='border:none;' colspan='2'>";
  19. $body .= "<a href='{$link}'><img src='{$logo}' alt=''></a><br><br>";
  20. $body .= "</td></tr></thead><tbody><tr>";
  21. $body .= "<td style='border:none;'><strong>Name:</strong> {$name}</td>";
  22. $body .= "<td style='border:none;'><strong>Email:</strong> {$from}</td>";
  23. $body .= "</tr>";
  24. $body .= "<tr><td style='border:none;'><strong>Subject:</strong> {$csubject}</td></tr>";
  25. $body .= "<tr><td></td></tr>";
  26. $body .= "<tr><td colspan='2' style='border:none;'>{$cmessage}</td></tr>";
  27. $body .= "</tbody></table>";
  28. $body .= "</body></html>";
  29. $send = mail($to, $subject, $body, $headers);
  30. ?>