Repository navigation
Mail MVP #4000
Description
Initial Checklist
- I understand this is a user story and questions should be posted in the Community Discussions
- I searched issues and couldn’t find anything (or linked relevant results below)
User Story
As a user of the OpenCloud mail app, I want to read, answer, organize and find my emails with the everyday actions every mail client has, so that I can use OpenCloud as my daily mail client instead of a separate one.
User Value
Today the mail app can show mailboxes and mails and write and send new mails and drafts. It can't reply, forward, delete, move, mark unread, flag or search, and it loads every mailbox completely in one request. That makes it a mail viewer with a compose button rather than a mail client.
The groupware API already offers most of what's needed: keyword updates, mailbox changes via PATCH, delete, full-text search with filters, inReplyTo/references on drafts, and blob up- and download. So this MVP is mostly web work. Paging is the main backend gap.
Acceptance Criteria
Sub-issues (MVP):
- Reply, reply all and forward (Reply, reply all and forward mails #4001)
- Delete mails: move to trash, delete permanently from trash, with confirmation (Delete mails #4002)
- Move mails to another mailbox (Move mails to another mailbox #4003)
- Mark mails as read/unread and flag/unflag them (Mark mails as read or unread and flag them #4004)
- Load mails in pages for large mailboxes (depends on the backend item below) (Load mails in pages for large mailboxes #4005)
- Search mails in the current mailbox and across all mailboxes (Search mails #4006)
- Complete detail view: Cc, Reply-To, inline images, remote images blocked until allowed (Show all recipients and inline images in the mail details and block remote content #4007)
- Quality: send with the selected identity, error states and messages, no logging of mail data (
console.info), unit tests (Send mails from the selected address and show errors in the mail app #4008) - Recipient suggestions from contacts in the compose form (Recipient suggestions from contacts in the mail app #3850, part of Contacts MVP #3844, PR feat(mail): suggest recipients from contacts #3859)
Backend dependencies (groupware service, groupware branch at 2e0034cc0a):
-
GET /accounts/{accountId}/mailboxes/{mailboxId}/emailscan't page: inquery()(services/groupware/pkg/groupware/templates.go) parsing ofposition/anchor/anchorOffsetis commented out,EmailSearchResultshas nonextfield, andGROUPWARE_DEFAULT_EMAIL_LIMITdefaults to0(no limit), so the whole mailbox is returned. Blocks Load mails in pages for large mailboxes #4005. Possible workaround:GET /accounts/{accountId}/emails?mailbox=…&position=…&limit=…(unverified with real data). -
Request.unsupportedQueryParams(request.go) returns after checking the first query parameter in random map order, so unsupported parameters are only rejected sometimes (?limit=2&position=2on the mailbox endpoint returned 200 withposition: 0). - Empty results leave out
resultsandlimit({"position":0,"total":0}), same as for contacts in Contacts MVP #3844. -
DELETE /accounts/{accountId}/emails/{emailId}deletes permanently (JMAPEmail/set destroy). There is no "move to trash" call, so the web has to usePATCH … {"mailboxIds": {<trashId>: true}}(unverified live). - No bulk update route (only needed for multi-select, out of scope).
- Sending doesn't mark the original as answered/forwarded (
SubmitEmailonly removes$draft). The web sets$answered/$forwardedviaPATCH /emails/{id}/keywordsfor the MVP. - Server-side sanitizing (
bluemonday.UGCPolicy()) keeps remote<img src>, so blocking remote content is left to the web. A backend option would be nice but isn't blocking. - Same as in Contacts MVP #3844: as soon as another account shares something with a user,
GET /groupware/accountsreturns 403 (Identity/getfor shared accounts) and the mail app stops loading. - Minor:
GET /accounts/{accountId}/quotareturns 400 "Missing mandatory path parameter ''" (not needed for the MVP).
Out of scope for the MVP (follow-ups):
- Create, rename and delete mailboxes, nested mailboxes as a tree
- Multi-select and bulk actions (needs a bulk endpoint)
- Thread/conversation view
- Push or live updates for new mail
- Signatures, identity management, vacation responder
- Filters and rules (Sieve), spam handling
- Saving attachments to OpenCloud Files, attaching files from Files
- Print, view source, unified inbox across accounts, quota display
Activity