Skip to content

Comments

Implement getMailboxes API and create dedicated admin section for provider accounts#32

Draft
Copilot wants to merge 8 commits intofeature/provider_mails_adminfrom
copilot/add-mailbox-overview-feature-again
Draft

Implement getMailboxes API and create dedicated admin section for provider accounts#32
Copilot wants to merge 8 commits intofeature/provider_mails_adminfrom
copilot/add-mailbox-overview-feature-again

Conversation

Copy link

Copilot AI commented Feb 6, 2026

The IonosProviderFacade::getMailboxes() method was stubbed out, returning an empty array with a TODO comment. This implements the actual functionality using the IONOS Mail Configuration API and creates a dedicated admin section for email provider account management.

Changes

IonosAccountQueryService

  • Added getAllMailAccountResponses() calling $apiInstance->getAllFunctionalAccounts(BRAND, externalReference)
  • Returns MailAccountResponse[] from API, empty array on exceptions

IonosProviderFacade

  • getMailboxes() now fetches from API via query service
  • Transforms responses to required format: array{userId: string, email: string, name: string}
  • Extracts userId from email localpart (before @)
  • Falls back to userId when getName() returns null

Admin Settings Architecture

  • Created ProviderAccountOverviewSettings as dedicated delegated settings class
  • Created MailProviderAccountsSection for custom admin navigation entry
  • Moved MailboxAdministration UI to separate settings page with own navigation entry
  • Email provider account management now appears in its own "Email Provider Accounts" section instead of being embedded in Groupware
  • Added webpack entry point provider-account-overview for new settings page
  • Registered new settings and section in appinfo/info.xml

Tests

  • 5 tests in IonosProviderFacadeTest covering success, empty, exception, and null-name cases
  • 3 tests in new IonosAccountQueryServiceTest for API error handling
  • 5 tests in new ProviderAccountOverviewSettingsTest for settings class
  • 4 tests in new MailProviderAccountsSectionTest for section class

Example

// API returns
[
  MailAccountResponse { email: "john.doe@ionos.com", name: "John Doe" },
  MailAccountResponse { email: "jane@ionos.com", name: null }
]

// Transforms to
[
  ['userId' => 'john.doe', 'email' => 'john.doe@ionos.com', 'name' => 'John Doe'],
  ['userId' => 'jane', 'email' => 'jane@ionos.com', 'name' => 'jane']
]

Backward compatible - returns empty array on API failures with error logging.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Implement mailbox overview feature in admin settings Add mailbox administration interface with provider-agnostic API Feb 6, 2026
Copilot AI requested a review from tanyaka February 6, 2026 10:52
Copilot AI changed the title Add mailbox administration interface with provider-agnostic API Implement getMailboxes using IONOS getAllFunctionalAccounts API Feb 6, 2026
@bromiesTM
Copy link

@copilot
Currently the email provider list is displayed in "Groupware.

We have to ensure that:

the Provider emails editing will get its own Admin navigation entry.
Email Provider Settings will get its own delegated settings (e.g. lib/Settings/ProviderAccountOverviewSettings.php)

Use the IDelegatedSettings getSection() to set the Nav Entry

Copy link
Author

Copilot AI commented Feb 11, 2026

@copilot
Currently the email provider list is displayed in "Groupware.

...

Done! I've created a separate admin navigation entry for Email Provider Account management:

Changes in commit e06c426:

  • Created ProviderAccountOverviewSettings as a separate delegated settings class
  • Created MailProviderAccountsSection that returns mail-provider-accounts as the section ID
  • Moved the MailboxAdministration UI to the new dedicated settings page
  • Registered both the settings and section in info.xml
  • Removed MailboxAdministration from the Groupware section

The email provider settings now have their own navigation entry in the admin panel, completely separate from Groupware.

Copilot AI changed the title Implement getMailboxes using IONOS getAllFunctionalAccounts API Implement getMailboxes API and create dedicated admin section for provider accounts Feb 11, 2026
Copilot AI requested a review from bromiesTM February 11, 2026 15:05
…251208083401

composer update ionos-productivity/ionos-mail-configuration-api-client

https://github.com/IONOS-Productivity/ionos-mail-configuration-api-client/releases/tag/2.0.0-20251208083401
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
@printminion-co printminion-co changed the base branch from ionos-dev to feature/provider_mails_admin February 12, 2026 12:39
@printminion-co printminion-co added this to the ncw-4 milestone Feb 12, 2026
Copilot AI and others added 7 commits February 12, 2026 13:43
- Add AccountAlreadyExistsException for conflict handling
- Extend IMailAccountProvider interface with mailbox methods (getMailboxes, updateMailbox, deleteMailbox)
- Implement mailbox methods in IonosProvider and IonosProviderFacade
- Add controller methods in ExternalAccountsController (indexMailboxes, updateMailbox, destroyMailbox)
- Add new routes for mailbox operations
- Add localpart validation in updateMailbox with regex check

Co-authored-by: tanyaka <1401715+tanyaka@users.noreply.github.com>
- Add tests for indexMailboxes endpoint
- Add tests for updateMailbox with validation scenarios
- Add tests for destroyMailbox endpoint
- Cover error cases including invalid localpart, account conflicts, and provider not found

Co-authored-by: tanyaka <1401715+tanyaka@users.noreply.github.com>
- Create MailboxAdminService for API integration
- Create MailboxAdministration main component with list view
- Create MailboxListItem for individual mailbox rows with edit/delete actions
- Create MailboxDeletionModal for delete confirmation
- Implement loading, error, and empty states
- Add user avatar and details display

Co-authored-by: tanyaka <1401715+tanyaka@users.noreply.github.com>
- Add MailboxAdministration component to AdminSettings.vue
- Component appears as separate settings section
- Displays after existing mail app settings

Co-authored-by: tanyaka <1401715+tanyaka@users.noreply.github.com>
- Change section name from German to English
- Update table headers for consistency
- Keep translation system in place for future localization

Co-authored-by: tanyaka <1401715+tanyaka@users.noreply.github.com>
- Add getAllMailAccountResponses() method to IonosAccountQueryService
- Update getMailboxes() in IonosProviderFacade to fetch from API
- Extract userId from email localpart
- Add comprehensive unit tests for both services
- Handle API exceptions gracefully with proper logging

Co-authored-by: tanyaka <1401715+tanyaka@users.noreply.github.com>
- Create ProviderAccountOverviewSettings with its own navigation entry
- Create MailProviderAccountsSection for custom admin section
- Move MailboxAdministration component to new settings page
- Remove MailboxAdministration from general AdminSettings
- Add webpack entry for provider-account-overview
- Add comprehensive unit tests for new settings classes

This ensures email provider account management has its own dedicated
navigation entry instead of being embedded in the Groupware section.

Co-authored-by: bromiesTM <78687674+bromiesTM@users.noreply.github.com>
@printminion-co printminion-co force-pushed the copilot/add-mailbox-overview-feature-again branch from e06c426 to 1d657f1 Compare February 12, 2026 12:43
@printminion-co printminion-co force-pushed the feature/provider_mails_admin branch from 261d3e5 to d7fef5e Compare February 13, 2026 08:34
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.

4 participants