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 .= "

📦 Carton Order Details

"; $email_body .= "Model: {$model}
"; $email_body .= "Dimensions (cm): {$dimensions}
"; $email_body .= "Thickness: {$thickness}
"; $email_body .= "Quantity: {$quantity}
"; $email_body .= "

🗒 Notes

"; $email_body .= "

" . ($notes ?: 'N/A') . "

"; $email_body .= "📅 Delivery Preferred Date: {$delivery_date}
"; $text_body = "New Order Details:\n\n"; $text_body .= "Product: {$product}\n"; $text_body .= "Client Name: {$client_name}\n"; $text_body .= "Phone Number: {$phone_number}\n"; $text_body .= "Delivery Address: {$delivery_address}\n"; $text_body .= "--- Carton Order Details ---\n"; $text_body .= "Model: {$model}\n"; $text_body .= "Dimensions (cm): {$dimensions}\n"; $text_body .= "Thickness: {$thickness}\n"; $text_body .= "Quantity: {$quantity}\n"; $text_body .= "--- Notes ---\n"; $text_body .= ($notes ?: 'N/A') . "\n"; $text_body .= "Delivery Preferred Date: {$delivery_date}\n"; if (isset($pro_forma_email) && filter_var($pro_forma_email, FILTER_VALIDATE_EMAIL)) { $email_body .= "

Pro-forma Invoice Request

"; $email_body .= "

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')); } } } ?> Order <?php echo $product; ?> - <?php echo htmlspecialchars($_SERVER['PROJECT_NAME'] ?? 'Packaging Solutions'); ?>

Order:


Fill out the form below to place your order.

📦 Carton Order Details