Instead of hardcoding PLAIN auth or switching on provider name, query
the server's EHLO response for advertised AUTH mechanisms and pick the
best one (PLAIN preferred, LOGIN as fallback). This properly handles
Microsoft 365 which only advertises LOGIN, and any future server with
non-standard auth support.
Also adds TLS safety check to LOGIN auth (matching PlainAuth behavior)
and moves auth negotiation into each send method so it happens after
the connection and STARTTLS upgrade, when capabilities are accurate.
- Add comprehensive tests for internal/api/config_handlers.go (Phases 1-3)
- Improve test coverage for AI tools, chat service, and session management
- Enhance alert and notification tests (ResolvedAlert, Webhook)
- Add frontend unit tests for utils (searchHistory, tagColors, temperature, url)
- Add proximity client API tests
Add comprehensive tests for EnhancedEmailManager covering:
- Rate limiting (exceeds limit, resets after minute, concurrency, negative values)
- Provider username defaults (SendGrid, SparkPost, Resend, Postmark)
- TLS routing (TLS, StartTLS, plain connections)
- Retry logic (retries on failure, rate limit prevents retry)
- Connection error handling for sendTLS, sendStartTLS, sendPlain
This is the first test file for email_enhanced.go which previously had
0% coverage on sendTLS, sendStartTLS, and TestConnection functions.