Write incoming messages to Tables
Feature Request
As a Nextcloud user I want to process emails via the Tables app.
Implementation
Write all incoming messages to Tables. The Tables app provides an API [^1] for this. [^1]: APi documentation
The user can map mail properties to columns. We can do this in the account settings if there's only ever one mailbox to be mapped, but if we want to allow more than just the INBOX, adding the settings to each mailbox' three- dot menu might be wise. But might be YAGNI.
As soon as a mapping exists, the export to Tables should run automatically.
Export messages on a Mailbox level. All incoming messages are written to the table.
Only do this for the INBOX at the moment. Prepare API so it's flexible enough for any mailbox. Either write a message to the table as soon as it is written to oc_mail_messages or sync them via background job.
Work packages
- [ ] https://github.com/nextcloud/mail/issues/9529
Follow-ups
- https://github.com/nextcloud/mail/issues/9531
- https://github.com/nextcloud/mail/issues/9532 (possibly out of scope)
Out of scope
- https://github.com/nextcloud/mail/issues/9533
- Information changes in the tables app reflecting in the mail app - i.e. setting flags
TBD
- Should the mappings be stored in a separate table or is oc_preferences enough?
- What happens when a column is deleted in the Tables app that has been mapped to data in the Mail app? Ideas: make table columns read-only, show an error in the mail app, show a warning for the mappings in the table app
Are we still doing this one now after our discussion last week?
Superseded by https://github.com/nextcloud/mail/issues/9691