# CORI Mail AI Email Assistant Foundation - v364

## Purpose

CORI Mail is the next CORI-first surface after CORI Briefing and CORI Financial. Its job is to make email simple for dispatch users.

The user should not need to search through a crowded inbox. CORI should show the important messages first, explain what each one means, suggest the next step, and prepare a reply that the user can edit and approve.

## Page added

`/cori/mail`

## Navigation

CORI Mail now appears under the left sidebar **Ask CORI** section with:

- CORI Briefing
- Ask CORI
- CORI Financial
- CORI Mail
- CORI's Quotes

## User-facing behavior

The v364 surface includes:

- a plain CORI email briefing
- most-important-first email cards
- money, paperwork, driver, and sales categories
- a selected-email readout
- linked load/truck/work context
- simple explanation of why the email matters
- best next step guidance
- suggested reply editor
- reply tone controls: clear, friendly, firm, short
- Ask CORI Mail command box
- save-draft readiness
- guarded send readiness

## Send safety rule

CORI may prepare an answer, but real email must not be sent without a user action.

The page keeps sending locked until Gmail or Outlook OAuth/provider integration is added. This prevents the app from implying that real inbox sending is already connected.

## Future integration path

Future builds should add:

1. Gmail and Outlook OAuth connection.
2. Provider-backed inbox read access with workspace/user consent.
3. Provider-backed draft storage.
4. Provider-backed send action with clear user approval.
5. Email-to-load, email-to-task, email-to-note, and email-to-billing conversion.
6. Email audit trail for who instructed CORI, what draft was produced, what was edited, and when the message was sent.
7. Attachment scanning for rate confirmations, BOLs, PODs, invoices, and receipts.

## Language standard

CORI Mail should use simple, direct wording:

- "Needs answer now"
- "Best next step"
- "Suggested answer"
- "Review send"
- "Connect email to send"

Avoid technical provider language on the normal user surface except where needed to explain that Gmail or Outlook is not connected yet.

## Prisma impact

No Prisma schema changes were made in v364.
