Skip to main content
New Booking Request

Name: $name

Email: $email

Service Interested: $service

Vehicle Type: $vehicle_type

Make & Model: $make_model

Vehicle Age: $vehicle_age

Exterior Condition: $exterior_condition

Interior Condition: $interior_condition

Preferred Date & Time: $date_time

How they heard about us: $referral

Additional Services: $additional_services

Comments: $comments

"; // Send email using PHPMailer $mail = new PHPMailer(true); try { // SMTP settings $mail->isSMTP(); $mail->Host = 'smtp.your-email-provider.com'; // Replace with your SMTP provider (e.g., smtp.gmail.com) $mail->SMTPAuth = true; $mail->Username = 'your-email@example.com'; // Replace with your email $mail->Password = 'your-email-password'; // Replace with your email password $mail->SMTPSecure = 'tls'; // or 'ssl' $mail->Port = 587; // Adjust if needed (Gmail: 587 for TLS, 465 for SSL) // Email headers $mail->setFrom('your-email@example.com', 'The Valet Van'); $mail->addAddress('thevaletvan@gmail.com'); // The destination email $mail->Subject = "New Service Booking from $name"; $mail->isHTML(true); $mail->Body = $email_body; // Send email if ($mail->send()) { echo json_encode(["success" => true, "message" => "Form submitted successfully."]); } else { echo json_encode(["success" => false, "message" => "Email sending failed."]); } } catch (Exception $e) { echo json_encode(["success" => false, "message" => "Mailer Error: {$mail->ErrorInfo}"]); } } else { echo json_encode(["success" => false, "message" => "Invalid request."]); } ?>