From: garvinhicking Date: Wed, 24 May 2006 13:50:11 +0000 (+0000) Subject: plugin mail fix X-Git-Tag: 1.0~17 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5af27dd38dabdb6e3584b8a0043160b2e2810c2a;p=s9y.git plugin mail fix --- diff --git a/plugins/serendipity_event_mailer/serendipity_event_mailer.php b/plugins/serendipity_event_mailer/serendipity_event_mailer.php index 6cb9cbf..d497299 100644 --- a/plugins/serendipity_event_mailer/serendipity_event_mailer.php +++ b/plugins/serendipity_event_mailer/serendipity_event_mailer.php @@ -158,7 +158,10 @@ class serendipity_event_mailer extends serendipity_event $mailto = trim($this->get_config('category_' . $cid)); if (!empty($mailto) && isset($selected[$cid])) { - $to[] = $mailto; + $tos = explode(' ', $mailto); + foreach($tos AS $mailtopart) { + $to[] = trim($mailtopart); + } } } } @@ -196,8 +199,10 @@ class serendipity_event_mailer extends serendipity_event } foreach($to AS $mailto) { - echo htmlspecialchars($mailto) . '...
'; - serendipity_sendMail($mailto, $mail['subject'], $mail['body'], $mail['from']); + if (!empty($mailto)) { + echo htmlspecialchars($mailto) . '...
'; + serendipity_sendMail($mailto, $mail['subject'], $mail['body'], $mail['from']); + } } } return true;