Skip to content

Issue #97: Add support for specifying multiple email addresses #250

Merged
owenherbert-catalyst merged 1 commit into
MOODLE_404_STABLEfrom
issue97-MOODLE_404_STABLE-multiple_emails
May 12, 2026
Merged

Issue #97: Add support for specifying multiple email addresses #250
owenherbert-catalyst merged 1 commit into
MOODLE_404_STABLEfrom
issue97-MOODLE_404_STABLE-multiple_emails

Conversation

@djarran
Copy link
Copy Markdown
Contributor

@djarran djarran commented May 12, 2026

Description: Implement Issue #97. This allows users to specify multiple email addresses for the action step.

Changes

  1. In the step execute function, split emailto value by comma and loop over these values
  2. Add loop surrounding existing logic, iterating over the split emailto/recipients array

We did not change the fields available from this step to subsequent steps. There aren't steps that can make use of a comma separated string.

To ensure backwards compatibility, we just make the first email address accessible to subsequent steps.

Testing instructions

  1. Install plugin
  2. Navigate to admin/tool/trigger/manage.php
  3. Click Add new trigger workflow button
  4. Enter name
  5. Select Assignment: Course module viewed for Event to monitor setting
  6. Ensure Workflow active and Realtime processing are enabled
  7. Click Add workflow step
  8. Select Step type > Action
  9. Select Step > Email
  10. Enter step name and description
  11. Enter multiple emails in the To setting
  12. Enter email subject and content
  13. Open Mailhog
  14. View an assignment activity/module
  15. Ensure that emails are sent to both emails

@djarran djarran self-assigned this May 12, 2026
@owenherbert-catalyst owenherbert-catalyst self-requested a review May 12, 2026 04:00
Copy link
Copy Markdown
Contributor

@owenherbert-catalyst owenherbert-catalyst left a comment

Choose a reason for hiding this comment

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

Hey @djarran I tried to run through this locally but using multiple emails were causing issues in my testing. Can you please take a look?

Comment thread tests/email_action_step_test.php
Comment thread classes/steps/actions/email_action_step.php
Comment thread classes/steps/actions/email_action_step.php Outdated
Comment thread tests/email_action_step_test.php
@owenherbert-catalyst
Copy link
Copy Markdown
Contributor

@djarran Can you please squash these commits, we should be good to merge then.

@djarran djarran force-pushed the issue97-MOODLE_404_STABLE-multiple_emails branch from 19384de to 161db3c Compare May 12, 2026 23:45
@djarran
Copy link
Copy Markdown
Contributor Author

djarran commented May 12, 2026

@djarran Can you please squash these commits, we should be good to merge then.

Squashed now @owenherbert-catalyst

@owenherbert-catalyst owenherbert-catalyst merged commit 3ef42fd into MOODLE_404_STABLE May 12, 2026
@owenherbert-catalyst owenherbert-catalyst deleted the issue97-MOODLE_404_STABLE-multiple_emails branch May 12, 2026 23:49
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