Parent
Spec: MailChat MVP — email-as-chat
What to build
As a user, I can connect an IMAP/SMTP mailbox to MailChat by providing my address and app-specific password, and see it listed as a connected, validated account. Credentials are encrypted at rest using a master key sourced from the environment; the connection is validated against the real mail server (reusing the already-built, live-verified IMAP/SMTP clients) before the account is considered connected. Supports connecting more than one account to the same instance.
Acceptance criteria
Blocked by
- None — can start immediately
Parent
Spec: MailChat MVP — email-as-chat
What to build
As a user, I can connect an IMAP/SMTP mailbox to MailChat by providing my address and app-specific password, and see it listed as a connected, validated account. Credentials are encrypted at rest using a master key sourced from the environment; the connection is validated against the real mail server (reusing the already-built, live-verified IMAP/SMTP clients) before the account is considered connected. Supports connecting more than one account to the same instance.
Acceptance criteria
Accountmodel (provider/host/port/address) and a linkedCredentialsmodel exist, with credentials encrypted at rest (Fernet-style) using a master key read from an environment variable — never stored in the database.imap_client/smtp_clientconnect functions) before persisting the account as connected; a disconnect operation removes/deactivates an account.imap_client.list_folders) and lets the user pick which one is their Sent folder from that list — no free-text entry, no auto-detection/guessing. The selection is stored as a newAccount.sent_folderfield, defaulting to"Sent"only as the pre-selected option in the picker (not silently assumed if the user doesn't have a folder called that). (Decided in Decide reply send-from account and how sent replies re-enter the conversation — needed so sync can poll Sent per account; see Group messages into person+subject conversations and Reply within a conversation.)imap_client/smtp_clienttests) covering both successful and failing credentials; an htmx route test (FastAPITestClient) asserting the add-account form renders and a submitted account appears in the connected-accounts list.Account.sent_folder.Blocked by