# Version 2.2.2 Owner Alert Reliable Fix

This patch makes owner SMS/email alerts easier to trigger and easier to debug.

## What changed

- Adds detailed owner-alert logs:
  - [Owner alert check]
  - [Owner alert sending]
  - [Owner alert completed]
  - [Owner alert sms result]
  - [Owner alert email result]
  - [Owner alert skipped: ...]
  - [Owner alert sms failed]
  - [Owner alert email failed]
- Owner alert falls back to ENV values if runtime settings are blank.
- Owner alert can trigger from:
  - qualified flag
  - qualified/ready_to_book/booked status
  - service plus useful detail
  - AI final message phrases such as:
    - office will follow up
    - follow up with you soon
    - book an appointment
    - Calendly link
- Adds manual resend endpoint:
  POST /admin/api/leads/:id/resend-owner-alert

## Environment variables

OWNER_ALERTS_ENABLED=true
OWNER_ALERT_SMS_ENABLED=true
OWNER_ALERT_EMAIL_ENABLED=true
OWNER_ALERT_ON_READY_TO_BOOK=true

For SMS:
OWNER_PHONE=+1your_owner_phone

For email:
OWNER_EMAIL=you@example.com
EMAIL_PROVIDER=smtp
SMTP_HOST=your_smtp_host
SMTP_PORT=587
SMTP_USER=your_smtp_user
SMTP_PASS=your_smtp_password
FROM_EMAIL=you@example.com

## Testing

After a qualified lead flow, check stderr.log.
If owner alert does not send, the log should now clearly say why.
