tag to a * plain HTML form that posts here: *
* 2. Remove/ignore the JS fetch-based submit handler in js/main.js * (or leave it — this file also works with a normal form POST/redirect). * 3. Make sure TO_EMAIL below is correct, then upload this file to your * GoDaddy hosting root alongside the rest of the site. * * Note: shared hosting's built-in mail() function is often flagged as spam * by Outlook/Microsoft 365. If RFQ emails land in spam or don't arrive, * ask GoDaddy support about SMTP relay / "Email Business" add-on, or use * the Web3Forms setup instead — it does not have this problem. */ $TO_EMAIL = "Joe.D@CLE-MFG.com"; if ($_SERVER["REQUEST_METHOD"] !== "POST") { http_response_code(405); exit("Method not allowed"); } function clean($v) { return htmlspecialchars(trim($v ?? ""), ENT_QUOTES, "UTF-8"); } $fields = [ "First Name" => clean($_POST["First Name"] ?? ""), "Last Name" => clean($_POST["Last Name"] ?? ""), "Company" => clean($_POST["Company"] ?? ""), "Phone" => clean($_POST["Phone"] ?? ""), "Email" => clean($_POST["Email"] ?? ""), "Manufacturing Process" => clean($_POST["Manufacturing Process"] ?? ""), "Part Name or Description" => clean($_POST["Part Name or Description"] ?? ""), "Material" => clean($_POST["Material"] ?? ""), "Quantity / EAU" => clean($_POST["Quantity / EAU"] ?? ""), "Target Lead Time" => clean($_POST["Target Lead Time"] ?? ""), "Notes" => clean($_POST["Notes"] ?? ""), ]; if ($fields["First Name"] === "" || $fields["Email"] === "") { http_response_code(400); exit("Missing required fields"); } $subject = "New RFQ from CLE-MFG website — " . $fields["Company"]; $body = "New RFQ submitted on CLE-MFG.com\n\n"; foreach ($fields as $label => $value) { $body .= $label . ": " . $value . "\n"; } $headers = "From: CLE-MFG Website \r\n"; $headers .= "Reply-To: " . $fields["Email"] . "\r\n"; $headers .= "Content-Type: text/plain; charset=UTF-8\r\n"; // Note: file attachments from the RFQ upload field are NOT handled by this // simple example — mail() attachments require extra MIME boundary code. // If file uploads matter to you, use the Web3Forms setup instead, or ask // a developer to extend this script with PHPMailer. $sent = mail($TO_EMAIL, $subject, $body, $headers); if ($sent) { header("Location: contactrfq.html?sent=1"); } else { http_response_code(500); echo "There was a problem sending your RFQ. Please call (440) 391-2152."; }