Please complete all required fields.
‘;
} elseif (!is_email($customer_email)) {
$message = ‘
‘;
} else {
$recipients = array(
‘sm103@skymartauto.com’,
‘sm102@skymartauto.com’
);
$subject = ‘New Appointment Request – ‘ . $customer_name;
$email_body = “A new appointment request was submitted.\n\n”;
$email_body .= “Customer Name: {$customer_name}\n”;
$email_body .= “Email: {$customer_email}\n”;
$email_body .= “Phone: {$customer_phone}\n\n”;
$email_body .= “Vehicle Year: {$vehicle_year}\n”;
$email_body .= “Vehicle Make: {$vehicle_make}\n”;
$email_body .= “Vehicle Model: {$vehicle_model}\n\n”;
$email_body .= “Requested Service:\n{$service_needed}\n\n”;
$email_body .= “Preferred Date: {$preferred_date}\n”;
$email_body .= “Preferred Time: {$preferred_time}\n”;
$headers = array(
‘Content-Type: text/plain; charset=UTF-8’,
‘Reply-To: ‘ . $customer_name . ‘ <' . $customer_email . '>‘
);
$sent = wp_mail(
$recipients,
$subject,
$email_body,
$headers
);
if ($sent) {
$message = ‘
A SkyMart Auto representative will contact you to confirm.
‘;
} else {
$message = ‘
for assistance.
‘;
}
}
}
ob_start();
?>