Sha256: 20a22820c12d0b35f096705f1e7cf7822ac7ab997583de8353ad415f1762c492

Contents?: true

Size: 1.23 KB

Versions: 1

Compression:

Stored size: 1.23 KB

Contents

---
---
<?php
/* Request feilds from _includes/quick-contact.html */
// email to owner
  $to = "{{ site.author.email }}";
  $subject = "{{ site.url }} inquiry";

  $inquiryOption = $_REQUEST['inquiryOption'] ;
  $email = $_REQUEST['email'] ;

  $username = strstr($_REQUEST['email'], '@', true);

  // Sanitize E-mail Address
  $email = filter_var($email, FILTER_SANITIZE_EMAIL);

  $message_body .= "Email: ".$_POST["email"]."\n";
  $message_body .= "Subject: ".$_POST["inquiryOption"]."\n";

  $headers = "From:" . $email;

  mail($to, $subject, $message_body, $headers);

// email to user
  $subject_response = "Thank you for your message" ;

  $message_body_response = "Hello,\n\n";

  $message_body_response .= "This is an automated response to the message you sent whilst browsing madeslowly.co.uk.\n\n";

  $message_body_response .= "Thank you for your message, I'll get back to you as soon as I can.\n\n\n";

  $message_body_response .= "Arran Curran\n\n";
  $message_body_response .= " Made Slowly | Custom websites designed in Oxford \n\n\n";

  $headers_response = "From:" . $to;

  mail($email, $subject_response, $message_body_response, $headers_response );

  $host  = $_SERVER['HTTP_HOST'];

  header("Location: /contact-confirm/");
  exit();
?>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
made-slowly-0.0.1 assets/php/quick-contact-submission.php