<h4>Contact Us — Send Email Fix (CRITICAL)</h4><ul><li><strong>CRITICAL Fixed:</strong> Fatal error on send: <code>Field 'subjectid_fk' doesn't have a default value</code> — the insert data array was missing <code>subjectid_fk</code> which is a NOT NULL field in <code>domain_tblcm_contactus_email_data</code>. Added <code>'subjectid_fk' => $r['subjectid_fk'] ?? 0</code> to the insert data. This was THE root cause of 'send email not working' — the form submitted, passed captcha validation, but crashed on DB insert. The fatal error returned HTML instead of JSON, which jQuery's <code>dataType:'json'</code> couldn't parse, so the success handler never fired and the error handler only did console.log().</li><li><strong>Fixed:</strong> No user feedback on form submit — <code>beforeSend</code> was commented out, <code>error</code> handler only logged to console. Added SweetAlert for: loading state ('Sending...'), success ('Message Sent\!'), error ('An error occurred'), and wrong captcha/invalid email warnings.</li><li><strong>Fixed:</strong> Added <code>default</code> case in switch for unexpected response statuses.</li><li><strong>Fixed:</strong> Wrapped <code>sendNotification()</code> calls in try/catch to prevent notification errors from blocking the success alert.</li><li><strong>Fixed:</strong> Undefined variables <code>$custom_message</code>, <code>$recipient_id</code>, <code>$recipient_acctid</code> — initialized with defaults before use in notification array.</li><li><strong>Fixed:</strong> Null access on <code>$menu['mid']</code> — added null coalescing fallback.</li></ul><p><strong>Test Results:</strong> Correct captcha → success JSON with notifications. Wrong captcha → error JSON. Empty/invalid email → error JSON. All responses are clean JSON with proper status codes.</p><p><strong>Files:</strong> controller/contact_us/ContactUsController.php, platform/module/ContactUsManager/inc_email_form.php</p>