customer-riverside/docker/php/fake-sendmail.sh

10 lines
243 B
Bash
Raw Normal View History

Add email field to booking form + dev mail mocking - Add required email input (with autocomplete="email") to the booking details form in the homepage Preact widget (rpt-booking.js). Update EMPTY_FORM, submit payload, confirmedAppointment, and success summary to include it. The form now collects: first/last name, email, phone, comments. - Update ScheduleController::storeSlot to extract/pass email in the booking_request mail params (and require it for the full-contact path). Log failures with details; return a structured error with a user-friendly message instead of bare "mail_failed". - riverside_pt_mail hook now includes the user's email in the notification body (when provided). - Dev improvements for mail: - In DEBUG mode (default on localhost), force php_mail interface in settings.php so the mailer uses the sendmail_path override. - Dockerfile + entrypoint.sh now provide/install a fake-sendmail.sh that prints the full email (To, Subject, headers, body from the hook) to stderr (visible in `docker compose logs`) and always succeeds (exit 0). This prevents "sh: 1: /usr/sbin/sendmail: not found" and guarantees booking submissions never return the "unable to send confirmation email" error in dev. - In non-DEBUG, still uses symfony_mailer + Postmark as before. - The fake is also baked into the image for consistency. - JS error handling now prefers the server-provided 'message' from the JSON error response (better UX for real mail failures). - Update CLAUDE.md with the new email field + dev mail mocking behavior. - New file: docker/php/fake-sendmail.sh (the mock). This addresses the recent "mail_failed" issues while keeping production email via Postmark.
2026-06-03 22:05:06 -08:00
#!/bin/sh
2026-06-03 22:30:44 -08:00
echo "=== MOCK SENDMAIL (dev - email logged, not sent) ===" >&2
Add email field to booking form + dev mail mocking - Add required email input (with autocomplete="email") to the booking details form in the homepage Preact widget (rpt-booking.js). Update EMPTY_FORM, submit payload, confirmedAppointment, and success summary to include it. The form now collects: first/last name, email, phone, comments. - Update ScheduleController::storeSlot to extract/pass email in the booking_request mail params (and require it for the full-contact path). Log failures with details; return a structured error with a user-friendly message instead of bare "mail_failed". - riverside_pt_mail hook now includes the user's email in the notification body (when provided). - Dev improvements for mail: - In DEBUG mode (default on localhost), force php_mail interface in settings.php so the mailer uses the sendmail_path override. - Dockerfile + entrypoint.sh now provide/install a fake-sendmail.sh that prints the full email (To, Subject, headers, body from the hook) to stderr (visible in `docker compose logs`) and always succeeds (exit 0). This prevents "sh: 1: /usr/sbin/sendmail: not found" and guarantees booking submissions never return the "unable to send confirmation email" error in dev. - In non-DEBUG, still uses symfony_mailer + Postmark as before. - The fake is also baked into the image for consistency. - JS error handling now prefers the server-provided 'message' from the JSON error response (better UX for real mail failures). - Update CLAUDE.md with the new email field + dev mail mocking behavior. - New file: docker/php/fake-sendmail.sh (the mock). This addresses the recent "mail_failed" issues while keeping production email via Postmark.
2026-06-03 22:05:06 -08:00
echo "Timestamp: $(date -Iseconds)" >&2
2026-06-03 22:30:44 -08:00
echo "Called as: $0 $*" >&2
echo "----- EMAIL CONTENT -----" >&2
Add email field to booking form + dev mail mocking - Add required email input (with autocomplete="email") to the booking details form in the homepage Preact widget (rpt-booking.js). Update EMPTY_FORM, submit payload, confirmedAppointment, and success summary to include it. The form now collects: first/last name, email, phone, comments. - Update ScheduleController::storeSlot to extract/pass email in the booking_request mail params (and require it for the full-contact path). Log failures with details; return a structured error with a user-friendly message instead of bare "mail_failed". - riverside_pt_mail hook now includes the user's email in the notification body (when provided). - Dev improvements for mail: - In DEBUG mode (default on localhost), force php_mail interface in settings.php so the mailer uses the sendmail_path override. - Dockerfile + entrypoint.sh now provide/install a fake-sendmail.sh that prints the full email (To, Subject, headers, body from the hook) to stderr (visible in `docker compose logs`) and always succeeds (exit 0). This prevents "sh: 1: /usr/sbin/sendmail: not found" and guarantees booking submissions never return the "unable to send confirmation email" error in dev. - In non-DEBUG, still uses symfony_mailer + Postmark as before. - The fake is also baked into the image for consistency. - JS error handling now prefers the server-provided 'message' from the JSON error response (better UX for real mail failures). - Update CLAUDE.md with the new email field + dev mail mocking behavior. - New file: docker/php/fake-sendmail.sh (the mock). This addresses the recent "mail_failed" issues while keeping production email via Postmark.
2026-06-03 22:05:06 -08:00
cat >&2
echo "" >&2
echo "=== END MOCK SENDMAIL ===" >&2
exit 0