Skip to content

Refactor MailHelper to be more provider-agnostic - #7848

Merged
labkey-adam merged 3 commits into
developfrom
fb_mailhelper_refactor
Jul 21, 2026
Merged

Refactor MailHelper to be more provider-agnostic#7848
labkey-adam merged 3 commits into
developfrom
fb_mailhelper_refactor

Conversation

@labkey-adam

@labkey-adamlabkey-adam commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Rationale

The first Related PR added support for our first non-SMTP email provider (Microsoft Graph API email transport), but MailHelper and related classes remained very tied to SMTP. This takes steps toward making MailHelper provider-agnostic. https://github.com/LabKey/kanban/issues/1714

Related Pull Requests

Changes

  • Register SMTP provider like other providers
  • Improve configuration error to not hard-code any provider information - list only the providers that are available
  • Fix some potential concurrency issues

@labkey-bpatellabkey-bpatel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
Found no issues during manual test.

@labkey-adam
labkey-adam merged commit b5ffe7f into developJul 21, 2026
8 checks passed
@labkey-adam
labkey-adam deleted the fb_mailhelper_refactor branch July 21, 2026 20:33
labkey-adam added a commit to LabKey/testAutomation that referenced this pull request Jul 21, 2026
## Rationale
Dumbster changes to support a somewhat more agnostic MailHelper
## Related Pull Requests
- LabKey/platform#7848
labkey-adam added a commit to LabKey/testAutomation that referenced this pull request Aug 24, 2026
## Rationale
`AdminConsoleTest.testEmailTimeoutSettings()` started failing
intermittently in 26.8+, showing that the timeout settings were not
always present. This test is passing regularly in 26.7. I believe a
small MailHelper refactor in 26.8 caused a change in behavior; now, when
email recording is on, the "test email" page shows the dumbster
configuration (which lacks timeout properties) instead of the
application.properties configuration (which includes them by default).
This is likely the behavior we want in the "test email" page, so this
changes the test to shut off email recording if it's on. And then
restores it after verifying.
The change is not technically needed for 26.7, but it doesn't hurt to
disable/re-enable there.
Also, "admin" is not a module, so remove that reference from
`AbstractAdminConsoleTest.java`.
## Related Pull Requests
- LabKey/platform#7848
- #3150
Sign up for freeto 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

@labkey-adam@labkey-bpatel