- Add `Domains` field to MailServiceConfig for managing additional domains under single API
- Implement `matchDomain` helper function for precise and subdomain matching logic
- Update `GetServiceByDomain` to check both primary domain and additional domains list
- Enhance EmailConfig UI to display domain count and allow comma-separated domain input
- Add domains field to mail service request/response structures in API handlers
- Update frontend types to include domains array in MailService interface
- Improve documentation with clarification on primary vs additional domains usage
- Allows single mail service API to manage multiple email domains for verification and operations
- Update success message to specifically indicate S2A configuration switch
- Add detailed logging output showing switched API endpoint
- Display concurrency, priority, and group IDs in configuration log
- Add conditional proxy information logging when proxy is enabled
- Improve user visibility into active configuration after switching profiles
- Add backend endpoint `/api/s2a/fetch-groups` to fetch S2A groups using arbitrary credentials without depending on global config
- Implement `handleFetchGroups` handler with proper error handling and multiple auth header support (Bearer token, X-API-Key, X-Admin-Key)
- Add frontend API function `fetchGroupsWithCredentials` to call the new endpoint and parse S2A standard response format
- Add group fetching UI in S2AConfig edit mode with refresh button and loading state
- Implement batch group name caching in list view to display human-readable group names instead of IDs
- Deduplicate API requests by grouping profiles with identical credentials to avoid redundant calls
- Add fallback to display group ID when name is unavailable
- Add new `/api/s2a/profiles` endpoint supporting GET, POST, DELETE operations
- Create `s2a_profiles` database table with fields for API configuration, concurrency, priority, group IDs, and proxy settings
- Implement database methods: `GetS2AProfiles()`, `AddS2AProfile()`, `DeleteS2AProfile()`
- Add S2AProfile struct to database models with JSON serialization support
- Implement profile management UI in S2AConfig page with save, load, and delete functionality
- Add profile list display with ability to apply saved configurations
- Add S2AProfile type definition to frontend types
- Enable users to save and reuse S2A configurations as presets for faster setup
- Add CleanupStuckProcessingOwners database method to reset owners stuck in processing status back to valid state
- Call cleanup routine on application startup to recover from previous abnormal exits
- Call cleanup routine after batch processing completes to ensure no orphaned processing states remain
- Add markOwnerResult calls in processSingleTeam when team invitations are full to properly track owner status
- Prevents owners from being permanently stuck in processing state due to unexpected shutdowns or errors