Skip to content

feat: out of office forward to 2 - #13693

Open
ixgate-lpeters wants to merge 4 commits into
nextcloud:mainfrom
ixgate-lpeters:feat/out-of-office-forward-to-2
Open

ixgate-lpeters wants to merge 4 commits into
nextcloud:mainfrom
ixgate-lpeters:feat/out-of-office-forward-to-2

Conversation

@ixgate-lpeters

@ixgate-lpeters ixgate-lpeters commented Sep 16, 2026

Copy link
Copy Markdown

Summary

Adds the ability to forward incoming mails to another address (e.g. a substitute/colleague) while out of office is enabled, in addition to the existing vacation auto-reply.

Previously, the out-of-office feature only supported sending an automated reply to incoming mails. This PR extends the feature so users can optionally specify a forwardTo address, which is added as a Sieve redirect action alongside the vacation response.

Changes

  • Add optional forwardTo parameter to OutOfOfficeController::setOutOfOfficeState() (or relevant method)
  • Validate forwardTo as a proper email address, throwing a ClientException on invalid input
  • Extend OutOfOfficeState and OutOfOfficeParser to support the new forwardTo field
  • Extend Sieve script generation to include a redirect action when a forwarding address is configured
  • Add forwardTo input field to OutOfOfficeForm.vue
  • Add/extend unit tests:
    • OutOfOfficeParserTest
    • OutOfOfficeStateTest
    • New Sieve fixture: sieve-vacation-on-forward-to.sieve

Screenshots

How to test

  1. Go to Mail Settings → Out of Office
  2. Enable out of office and fill in start date, subject, and message
  3. Enter a valid email address in the new "Forward to" field
  4. Save the settings
  5. Verify:
    • The generated Sieve script contains a redirect action to the specified address
    • Sending a test mail to the account triggers both the vacation auto-reply and a forward to the specified address
  6. Test validation:
    • Enter an invalid email in "Forward to" → should show a client-side/server-side validation error
    • Leave "Forward to" empty → out-of-office should work as before (auto-reply only, no forwarding)

TODO / Open questions

  • Update user documentation / changelog

Checklist

  • Unit tests added/updated
  • Manual testing done
  • Documentation updated (if needed)
  • Changelog entry added (if required by project convention)

Lucas added 3 commits September 16, 2026 15:31
Adds the ability to specify a "forward to" email address as part of
the out-of-office configuration. When enabled, incoming mails are
not only answered with the vacation auto-reply, but also forwarded
to the given address using a Sieve "redirect" action.

- Add optional `forwardTo` parameter to OutOfOfficeController
- Validate forwardTo as a proper email address, throwing
  ClientException on invalid input
- Extend OutOfOfficeState and OutOfOfficeParser to support the new
  forwardTo field
- Extend Sieve script generation to include the redirect action
  when a forwarding address is configured
- Add forwardTo input field to OutOfOfficeForm.vue
- Add corresponding unit tests and sieve test fixture

Fixes a limitation where the out-of-office feature could only send
an automated reply, without the option to forward incoming messages
to a substitute/colleague.
Adds the ability to specify a "forward to" email address as part of
the out-of-office configuration. When enabled, incoming mails are
not only answered with the vacation auto-reply, but also forwarded
to the given address using a Sieve "redirect" action.

- Add optional `forwardTo` parameter to OutOfOfficeController
- Validate forwardTo as a proper email address, throwing
  ClientException on invalid input
- Extend OutOfOfficeState and OutOfOfficeParser to support the new
  forwardTo field
- Extend Sieve script generation to include the redirect action
  when a forwarding address is configured
- Add forwardTo input field to OutOfOfficeForm.vue
- Add corresponding unit tests and sieve test fixture

Fixes a limitation where the out-of-office feature could only send
an automated reply, without the option to forward incoming messages
to a substitute/colleague.

Assisted-by: local qwen 3.8
Signed-off-by: Lucas Peters <L.Peters@ixgate.de>
@welcome

welcome Bot commented Sep 16, 2026

Copy link
Copy Markdown

Thanks for opening your first pull request in this repository! ✌️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant