Skip to content

MODEMAIL-131 - Change bcc field to array of email addresses #125

Open
markusweigelt wants to merge 3 commits into
masterfrom
MODEMAIL-131
Open

MODEMAIL-131 - Change bcc field to array of email addresses #125
markusweigelt wants to merge 3 commits into
masterfrom
MODEMAIL-131

Conversation

@markusweigelt

@markusweigelt markusweigelt commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

MODEMAIL-131 - Change bcc field to array of email addresses

Purpose

The bcc field on POST /email was introduced (MODEMAIL-129) as a single comma-separated string. This change reworks it into a proper JSON array of email addresses so callers pass a structured list rather than encoding multiple recipients into one delimited string.

Approach

  • ramls/email_entity.json: redefine bcc as an array of email-string items instead of a single string
  • MailServiceImpl.resolveBcc: consume the list directly and hand it to Vert.x setBcc(List) - no comma-splitting or re-joining.
  • descriptors/ModuleDescriptor-template.json: bump the provided email interface version to 1.2 to signal the optional bcc array field cause missing in MODEMAIL-129.
  • Update SendingEmailTest and MailServiceImplTest to exercise the array-based bcc.

Model bcc as a JSON array of email strings instead of a comma-separated
string, so MailServiceImpl.resolveBcc consumes the list directly and
hands it to Vert.x setBcc(List) without splitting or re-joining.
Signals the optional bcc array field added to POST /email as a
backwards-compatible addition over the released email 1.1 interface.
@markusweigelt
markusweigelt requested review from a team and pfilippov-epam July 9, 2026 13:18
Replaces collect(Collectors.toList()) with the immutable Stream.toList(),
so resolveBcc consistently returns an unmodifiable list.
@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

Comment thread ramls/email_entity.json
"description": "Blind carbon copy recipient",
"type": "string",
"format": "email"
}

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.

it could be considered as a breaking change, so API version must be increased,
to avoid that - I would suggest to add new field - bccItems and deprecate this one

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@pfilippov-epam Thank you for your review and approval.

The BCC feature was only introduced in mid-June with that PR #124 and has not been included in any release yet. As far as we know, we are currently the only ones using it.

We missed the version bump in the June PR cause adding this field. In our opinion, updating the version is necessary so that we can properly reference it in the modules that depend on this feature.

Please let me know if, with this context, you are okay with merging it?

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