add proper domain#11
Merged
printminion-co merged 5 commits intoOct 30, 2025
Merged
Conversation
3 tasks
9a338a6 to
85d6d43
Compare
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
…ice methods Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
85d6d43 to
2ee9cd1
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the IONOS email account creation flow to separate username from domain. Instead of accepting a full email address, the system now accepts only the username portion and constructs the full email address by appending a configured mail domain extracted from the customer domain setting.
Key changes:
- Extract mail domain from customer domain using Public Suffix List
- Change API parameters from
emailAddresstoemailUser/userName - Remove email validation and extraction logic from IonosMailService
- Update frontend to display domain suffix and collect only username
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/Service/IONOS/IonosConfigService.php | Added getMailDomain() method to extract registrable domain from customer domain using Pdp library |
| lib/Service/IONOS/IonosMailService.php | Refactored createEmailAccount() to accept username instead of email address; removed extractDomain() and extractUsername() helper methods |
| lib/Controller/IonosAccountsController.php | Updated parameter from emailAddress to emailUser; removed email format validation; updated logging to use the constructed email from response |
| lib/Controller/PageController.php | Added IonosConfigService dependency and included mail domain in initial state |
| src/components/ionos/NewEmailAddressTab.vue | Changed input field from email to username; dynamically display domain suffix from preferences; construct full email for validation |
| src/init.js | Added initialization of ionos-mailconfig-domain preference in store |
| tests/Unit/Service/IONOS/IonosConfigServiceTest.php | Added comprehensive tests for getMailDomain() covering various domain formats |
| tests/Unit/Service/IONOS/IonosMailServiceTest.php | Updated all tests to use username instead of email address; removed tests for extraction methods |
| tests/Unit/Controller/IonosAccountsControllerTest.php | Updated tests to use emailUser parameter; removed email format validation test |
| tests/Unit/Controller/PageControllerTest.php | Added IonosConfigService mock and verified mail domain is included in preferences |
Comments suppressed due to low confidence (1)
src/components/ionos/NewEmailAddressTab.vue:1
- [nitpick] Comment updated to 'email user' but should be consistent with terminology used elsewhere. Consider 'Test with empty username' to match the parameter name.
<!--
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| $user = $this->userSession->getUser(); | ||
| $response = new TemplateResponse($this->appName, 'index'); | ||
|
|
||
|
|
There was a problem hiding this comment.
Unnecessary blank lines added. Remove extra blank line to maintain consistent code formatting.
Suggested change
…s parameter Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
… domain Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
2ee9cd1 to
6d16117
Compare
tanyaka
approved these changes
Oct 30, 2025
0b261cf
into
feature/create-ionos-mail
22 of 27 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
npm run mockof Mk/dev/add mock dev server ionos-mail-configuration-api-client#4.envadmin@storage.localhostfor local tests