<?php

if (!empty($_POST["send"])) {

	$name = $_POST["userName"];
	$email = $_POST["userEmail"];
	$phone = $_POST["phone"];
	$from = $_POST["moving-from"];
	$to = $_POST["moving-to"];
	$message = $_POST["content"];
	
	$subject = "Contact Us";
	$body = "Hello \n I'm $name \n Email: $email \n Phone: $phone \n \I want to move from: $from \n I want to move to: $to ";
	
	$toEmail = "info@interstatemoversusa.com";

	$mailHeaders = "From: " . $name . "<" . $email . ">\r\n";
	$mailHeaders = "Content-type: text/plain; charset=iso-8859-1\r\n";

	$retval = mail($toEmail, $subject, $body, $mailHeaders);


	if ($retval == true) {
		echo "Message sent successfully...";
	} else {
		echo "Message could not be sent...";
	}
}


header('location: index.php');
