| 1 | # Email Integration Plugin DOX |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | - Own communicating with Agent Zero through email inboxes and SMTP replies. |
| 6 | |
| 7 | ## Ownership |
| 8 | |
| 9 | - `helpers/handler.py` owns mailbox polling, state, dispatch, routing, and reply flow. |
| 10 | - `helpers/imap_client.py` and `helpers/smtp_client.py` own inbound and outbound mail transports. |
| 11 | - `helpers/dispatcher.py`, `prompts/`, and attachment helpers own routing decisions and message formatting. |
| 12 | - `api/`, `default_config.yaml`, `plugin.yaml`, `extensions/`, and `webui/` own tests, settings, metadata, hooks, and config UI. |
| 13 | |
| 14 | ## Local Contracts |
| 15 | |
| 16 | - Treat mailbox credentials and downloaded attachments as sensitive. |
| 17 | - Preserve UID/state tracking so restarts do not duplicate old mail. |
| 18 | - Keep SMTP replies threaded and safe around user-visible errors. |
| 19 | |
| 20 | ## Work Guidance |
| 21 | |
| 22 | - Coordinate polling, dispatch prompts, and WebUI settings when adding account or routing behavior. |
| 23 | |
| 24 | ## Verification |
| 25 | |
| 26 | - Smoke-test connection checks, polling, attachment handling, dispatch routing, and SMTP replies when practical. |
| 27 | |
| 28 | ## Child DOX Index |
| 29 | |
| 30 | No child DOX files. |