Skip to content

Commit fa6abdc

Browse files
committed
Improve comma-separated email addresses
1 parent 769c28a commit fa6abdc

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release Notes for Sherlock
22

3+
## 5.1.2 - 2025-04-11
4+
5+
- Improved the processing of comma-separated notification email addresses ([#46](https://github.com/putyourlightson/craft-sherlock/issues/46)).
6+
37
## 5.1.1 - 2025-04-09
48

59
- Fixed a bug in which notification emails were not being sent on newly failed scans ([#46](https://github.com/putyourlightson/craft-sherlock/issues/46)).

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "putyourlightson/craft-sherlock",
33
"description": "Security scanner and monitor to keep your site and CMS secure.",
4-
"version": "5.1.1",
4+
"version": "5.1.2",
55
"type": "craft-plugin",
66
"homepage": "https://putyourlightson.com/plugins/sherlock",
77
"license": "proprietary",

src/services/ScansService.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
use Craft;
99
use craft\base\Component;
10+
use craft\helpers\StringHelper;
1011
use craft\helpers\UrlHelper;
1112
use putyourlightson\sherlock\models\ScanModel;
1213
use putyourlightson\sherlock\records\ScanRecord;
@@ -209,8 +210,10 @@ private function sendNotifications(ScanModel $scanModel): void
209210
*/
210211
private function sendLogNotificationEmail(string $subject, string $body, string $log): void
211212
{
213+
$to = StringHelper::split(Sherlock::$plugin->settings->notificationEmailAddresses);
214+
212215
Craft::$app->mailer->compose()
213-
->setTo(Sherlock::$plugin->settings->notificationEmailAddresses)
216+
->setTo($to)
214217
->setSubject(Craft::$app->getSites()->getCurrentSite()->name . ' - ' . $subject)
215218
->setHtmlBody($body . UrlHelper::cpUrl('sherlock'))
216219
->send();

0 commit comments

Comments
 (0)