Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Variables Requested from Form
- $name = $_REQUEST['name'];
- $email = $_REQUEST['email'];
- $address = $_REQUEST['address'];
- $city = $_REQUEST['city'];
- $state = $_REQUEST['state'];
- $zip = $_REQUEST['zip'];
- $phone = $_REQUEST['phone'];
- $contact = $_REQUEST['contact'];
- $comment = $_REQUEST['comment'];
- // Parameters
- $email_recipient = "info@californiacustoms.net";
- $email_content_type = "text/html; charset=us-ascii";
- $email_client = "PHP/" . phpversion();
- // Headers
- $email_header = "From: " . $name . "\r\n";
- $email_header .= "Reply-To: " . $email . "\r\n";
- $email_header .= "Return-Path: " . $email . "\r\n";
- $email_header .= "Content-type: " . $email_content_type . "\r\n";
- $email_header .= "X-Mailer: " . $email_client . "\r\n";
- // Subject & Contents
- $email_subject = "$name Is Requsting Info";
- $email_contents = "<html>";
- $email_contents .= "<br>Name:" . $name;
- $email_contents .= "<br>E-Mail:" . $email;
- $email_contents .= "<br>Address:" . $address;
- $email_contents .= "<br>City:" . $city;
- $email_contents .= "<br>State:" . $state;
- $email_contents .= "<br>Zip Code:" . $zip;
- $email_contents .= "<br>Phone Number:" . $phone;
- $email_contents .= "<br>Preffered Method of Contact:" . $contact;
- $email_contents .= "<br>Comments:" . $comment;
- $email_contents .= "</html>";
- // Result Handling
- $email_result = mail($email_recipient, $email_subject, $email_contents, $email_header);
- if ($email_result) echo "Email has been sent!";
- else echo "Email has failed!";
- ?>
Add Comment
Please, Sign In to add comment