korsygfhrfggfhfgfffgffg6655665dtggggggzangaiide
Elehhjhjjkjkfpf6df56fd65ffff
/
home2
/
apcagkk2
/
intellectdrivingschool.com
/
Upload FileeE
HOME
<?php if ($_SERVER["REQUEST_METHOD"] == "POST") { // Get form data $name = $_POST['form_name']; $email = $_POST['form_email']; $subject = $_POST['form_subject']; $phone = $_POST['form_phone']; $message = $_POST['form_message']; // Set sender name $from_name = "IDK Contact"; // Compose email $to = "rashmirekha1235@gmail.com"; // Change this to your email address $subject = "New Contact Form Submission: $subject"; $body = "Name: $name\n"; $body .= "Email: $email\n"; // $body .= "Mobile: $phone\n"; $body .= "Message:\n$message"; // Set additional headers $headers = "From: $from_name <$email>\r\n"; $headers .= "Reply-To: $email\r\n"; $headers .= "Content-Type: text/plain; charset=utf-8\r\n"; // $headers .= "X-Mailer: PHP/" . phpversion(); // Optional: Add X-Mailer header for tracking // Send email if (mail($to, $subject, $body, $headers)) { // Email to user $user_subject = "Thank you for contacting us"; $user_body = "Dear $name,\n\nThank you for contacting us. We will get back to you soon.\n\nBest Regards,\nYour Company"; mail($email, $user_subject, $user_body); // Redirect user header("Location: index.php"); exit; } else { echo "Failed to send email. Please try again later."; } } else { // If accessed directly header("Location: index.php"); exit; } ?>