File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ private function getLogHandlers()
72
72
73
73
protected function getMailerHandler ()
74
74
{
75
- $ recipients = $ this ->getNotificationRecipients ();
75
+ $ recipients = $ this ->getFilteredNotificationRecipients ();
76
76
if (empty ($ recipients )) {
77
77
return false ;
78
78
}
@@ -88,6 +88,20 @@ protected function getMailerHandler()
88
88
return $ mailerHandler ;
89
89
}
90
90
91
+ private function getFilteredNotificationRecipients ()
92
+ {
93
+ $ result = [];
94
+
95
+ $ recipients = $ this ->getNotificationRecipients ();
96
+ foreach ($ recipients as $ recipient ) {
97
+ if (!empty ($ recipient ['address ' ]) && filter_var ($ recipient ['address ' ], FILTER_VALIDATE_EMAIL )) {
98
+ $ result [] = $ recipient ;
99
+ }
100
+ }
101
+
102
+ return $ result ;
103
+ }
104
+
91
105
protected function logDebug ($ message , array $ context = [])
92
106
{
93
107
return $ this ->icLogger ->debug ($ message , $ context );
You can’t perform that action at this time.
0 commit comments