Skip to content

Mail MVP #4000

Open
Open

Description

@tammi-23

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)

Related: #1457, #3844

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):

Backend dependencies (groupware service, groupware branch at 2e0034cc0a):

  • GET /accounts/{accountId}/mailboxes/{mailboxId}/emails can't page: in query() (services/groupware/pkg/groupware/templates.go) parsing of position/anchor/anchorOffset is commented out, EmailSearchResults has no next field, and GROUPWARE_DEFAULT_EMAIL_LIMIT defaults to 0 (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=2 on the mailbox endpoint returned 200 with position: 0).
  • Empty results leave out results and limit ({"position":0,"total":0}), same as for contacts in Contacts MVP #3844.
  • DELETE /accounts/{accountId}/emails/{emailId} deletes permanently (JMAP Email/set destroy). There is no "move to trash" call, so the web has to use PATCH … {"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 (SubmitEmail only removes $draft). The web sets $answered/$forwarded via PATCH /emails/{id}/keywords for 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/accounts returns 403 (Identity/get for shared accounts) and the mail app stops loading.
  • Minor: GET /accounts/{accountId}/quota returns 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions