feat: choose individual vs combined delivery for multi-recipient composes#20
Open
mrsafalpiya wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a send-mode choice on the Compose Email page when multiple To recipients are present, allowing users to send either one combined email or individual emails per recipient (with a privacy note for the combined option).
Changes:
- Adds a delivery-mode radio to the send confirmation modal when multiple “To” recipients exist, and updates the modal description accordingly.
- Updates compose sending to split recipients into per-recipient groups for “individual” mode, while suppressing per-email success toasts and showing a single summary toast instead.
- Adds unit tests covering recipient grouping and basic Mail queueing behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/Unit/ComposeSendModeTest.php | Adds tests for recipient grouping and verifies mail queueing behavior for combined vs individual deliveries. |
| src/Resources/EmailTemplateResource/Pages/ComposeEmail.php | Implements send-mode selection UI and updates send logic to support individual vs combined delivery. |
| src/Actions/EmailSender.php | Adds a notify flag to optionally suppress the success notification (used for individual batch sends). |
| resources/lang/en/fin-mail.php | Adds English translations for the new modal description, send-mode labels/help text, and summary notification. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+193
to
+196
| 'send_mode_individual' => 'Send each email individually', | ||
| 'send_mode_individual_help' => 'A separate email is sent to each recipient. No one sees the other recipients.', | ||
| 'send_mode_combined' => 'Send as a single email with multiple recipients', | ||
| 'send_mode_combined_help' => 'One email is sent to everyone. The complete recipient list is visible to all recipients.', |
Comment on lines
+191
to
+195
| 'description_multiple' => 'You have multiple recipients. Choose how you would like to send this email.', | ||
| 'send_mode_label' => 'How should this be sent?', | ||
| 'send_mode_individual' => 'Send each email individually', | ||
| 'send_mode_individual_help' => 'A separate email is sent to each recipient. No one sees the other recipients.', | ||
| 'send_mode_combined' => 'Send as a single email with multiple recipients', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On the Compose Email page, when the "To" field has more than one email addresses, sending now asks how to deliver. There will be two choices given in a modal:
Screenshots
Why
Currently composing an email to several email addresses at once always sents one message with every address exposed in the 'To' header. Althrough this package is not meant for bulk email, it's great to have the option to send each of the recipients individually. Also this makes it clear to the user about the visibility of all recipients list when composing to send a single email with multiple recipients.
Note
Currently only english language support is added. I guess I can generate the content for other languages too using AI if you approve of this PR.