Skip to content

feat: SMTP test sends a real email, Office 365 LOGIN auth, and multiple recipients#121

Open
jackyhowh wants to merge 5 commits into
bscott:mainfrom
jackyhowh:main
Open

feat: SMTP test sends a real email, Office 365 LOGIN auth, and multiple recipients#121
jackyhowh wants to merge 5 commits into
bscott:mainfrom
jackyhowh:main

Conversation

@jackyhowh

Copy link
Copy Markdown

Summary

  • Test Connection now sends a real email and confirms end-to-end delivery,
    instead of only checking authentication. Failures are now visible: the handler
    previously returned HTTP 400, which HTMX 1.x silently drops, so errors showed
    nothing in the UI — results now return 200 and render.
  • Office 365 / Outlook support: SMTP auth now negotiates the mechanism the
    server advertises (PLAIN or LOGIN). Fixes 504 5.7.4 Unrecognized authentication type, since Office 365 only offers AUTH LOGIN, not PLAIN.
  • Multiple recipients: the To field accepts several addresses separated by
    , or ;, for the test email and all renewal/cancellation/high-cost emails.
  • Added a 15s connection timeout so a bad host/port fails fast instead of hanging.
  • Updated the To-field help text in all locales; added recipient-parsing tests.

Changes

  • internal/service/smtp_auth.go (new): ParseEmailRecipients, plus SMTPAuth
    with PLAIN/LOGIN auto-negotiation and a loginAuth implementation.
  • internal/service/email.go: multi-recipient send + negotiated auth.
  • internal/handlers/settings.go: test handler sends a real email, returns 200
    so HTMX renders results, and adds a dial timeout.
  • web/locales/*.json: updated help text.
  • internal/service/smtp_auth_test.go: unit tests.

Test plan

  • go test ./... passes
  • Verified Test Connection delivers email via Office 365 (587/STARTTLS)
  • Verified multiple recipients all receive the email

jackyhowh and others added 5 commits June 12, 2026 14:56
…support

- Test Connection now sends an actual test email and confirms delivery,
  not just authentication
- Return HTTP 200 for test results so HTMX renders the success/error
  message instead of silently dropping non-2xx responses
- Add a 15s connection timeout so a wrong host/port or firewall drop
  fails fast instead of hanging the request
- Negotiate the SMTP AUTH mechanism (PLAIN or LOGIN) from the server's
  advertised list; fixes Office 365 "504 5.7.4 Unrecognized
  authentication type"
- Accept multiple recipients in the To field, separated by "," or ";",
  for both the test email and renewal/cancellation/high-cost emails
- Update To-field help text across locales; add ParseEmailRecipients tests
feat: SMTP test sends a real email, Office 365 LOGIN auth, and multiple recipients
feat(auth): add logout button to multiple templates based on AuthEnab…
@bscott bscott self-assigned this Jun 23, 2026
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.

2 participants