> ## Documentation Index
> Fetch the complete documentation index at: https://docs.younegotiate.com/llms.txt
> Use this file to discover all available pages before exploring further.

# EcoMailbox

> Jane receives an EcoLetter from ABC Collections. She opens EcoMailbox, reads the letter, and downloads it.

## Real-World Example

Jane receives an EcoLetter from ABC Collections. She opens EcoMailbox, reads the letter, and downloads it. The portal should mark the letter viewed and update campaign tracking without affecting unrelated letters.

## Visual Flow

```mermaid placement="top-right" actions={true} theme={"system"}
flowchart TD
    A["Consumer opens EcoMailbox"] --> B["Portal loads consumer EcoLetters"]
    B --> C["Consumer views or downloads a letter"]
    C --> D["Portal updates read and tracking state"]
    D --> E["Campaign tracker reflects engagement"]
    classDef default fill:#F8FAFC,stroke:#64748B,stroke-width:1.5px,color:#0F172A;
    classDef actor fill:#E0F2FE,stroke:#0284C7,stroke-width:2px,color:#0C4A6E;
    classDef system fill:#F8FAFC,stroke:#64748B,stroke-width:1.5px,color:#0F172A;
    classDef decision fill:#FEF3C7,stroke:#D97706,stroke-width:2px,color:#78350F;
    classDef risk fill:#FEE2E2,stroke:#DC2626,stroke-width:2px,color:#7F1D1D;
    classDef outcome fill:#DCFCE7,stroke:#16A34A,stroke-width:2px,color:#14532D;
    class A,C actor;
    class B,D,E system;
    class E outcome;
    linkStyle default stroke:#94A3B8,stroke-width:2px;
```

## How It Should Work

* It should show EcoLetters sent to the authenticated consumer.
* It should support reading, deleting, and downloading allowed letters.
* It should update unread counts and campaign tracking when the consumer engages.

## How It Should Not Work

* It should not show letters belonging to another consumer.
* It should not lose campaign tracking when a letter is viewed or downloaded.
* It should not delete a letter without respecting the intended consumer action.

## Developer Notes

* EcoMailbox bridges consumer experience and creditor campaign reporting.
* View/download tracking should stay aligned with CampaignTracker services.

## Related App Areas

* `app/Livewire/Consumer/EcoMailBox.php`
* `app/Jobs/SendSingleCampaignMessageJob.php`
* `app/Services/CampaignTrackerService.php`
* `app/Services/CampaignRecipientTrackingService.php`
