MODEMAIL-127 - Extend SMTP configuration to support identities#123
MODEMAIL-127 - Extend SMTP configuration to support identities#123markusweigelt wants to merge 8 commits into
Conversation
Allow a tenant to register multiple sender identities (address + optional display name) on one SMTP configuration. When EmailEntity.from matches an alias, the outgoing From header is rendered per RFC 5322 (`"Name" <addr>`) if a name is set, else the bare address. Duplicate addresses are rejected.
Include an empty fromAliases array in the SMTP configuration test builders so JsonMatchers.matchesJson (which requires exact field-name equality) aligns with responses that now default the field to an empty array.
|
@pfilippov-epam If you are not the right contact person for the review, please let me know. |
The SMTP sender list is now called "identities" rather than "fromAliases", with the corresponding generated POJO renamed from FromAlias to Identity. Pure rename across schema, service code, validator, and tests.
The 'from' description previously implied a fallback used when no identity matches, but the code only uses it to backfill EmailEntity.from when the request omits one. Rewrite both descriptions to match actual behaviour.
pfilippov-epam
left a comment
There was a problem hiding this comment.
Looks good, can I ask you to fix sonarcloud issues and update README.md documentation with example of identifiers usage?
Add identities row to the SMTP configuration parameters table, extend the email.settings example with a sample identities array, and explain the From-header matching and fallback behavior.
Thx quick review. I’ve fixed the SonarCloud issue and updated the README.md with a suitable example. Do you have any further feedback? Currently, there is an authentication issue with SonarCloud, which is causing the CI pipeline to fail. |
|
|
@pfilippov-epam Is it possible for me to merge these changes now with two approvals? |
Resolve each BCC address against configured sender identities and set them on the envelope only, keeping BCC recipients out of the rendered MimeMessage headers. Accepts a single or comma-separated address list.
|
|
Changes are already included in PR #124 and have been merged. |



MODEMAIL-127
- Extend SMTP configuration with identities
Purpose
This PR extends the settings by adding the ability to define
itentities. These can then be selected as the sender in various places within the FOLIO frontend, such as via a dropdown menu. This helps reduce incorrect input of the sender address.In addition, each address can be assigned an optional name, which is used both for display in the frontend selection and for generating the
Fromheader, enabling emails to be sent in accordance with the RFC 5322 standard, e.g."Library Notices" <library-notices@folio.org>.Approach
identitiesarray was added alongside the existing from field, each entry has a required address and an optional nameFromaddress for mail message