New Order Details:";
$email_body .= "Product: {$product}
";
$email_body .= "Client Name: {$client_name}
";
$email_body .= "Phone Number: {$phone_number}
";
$email_body .= "Delivery Address: {$delivery_address}
";
$email_body .= "
" . ($notes ?: 'N/A') . "
"; $email_body .= "📅 Delivery Preferred Date: {$delivery_date}Please send a pro-forma invoice to: {$pro_forma_email}
"; $text_body .= "\n--- Pro-forma Invoice Request ---\n"; $text_body .= "Please send a pro-forma invoice to: {$pro_forma_email}\n"; } $attachments = []; if (isset($_FILES['design_file']) && $_FILES['design_file']['error'] == UPLOAD_ERR_OK) { $attachments[] = $_FILES['design_file']; } $result = MailService::sendMail($to, $subject, $email_body, $text_body, [], $attachments); if (!empty($result['success'])) { $message_sent = true; } else { $error_message = "Sorry, there was an error sending your order. Please try again later."; error_log("MailService Error: " . ($result['error'] ?? 'Unknown error')); } } } ?>Fill out the form below to place your order.