]> git.mjollnir.org Git - s9y.git/commitdiff
plugin mail fix
authorgarvinhicking <garvinhicking>
Wed, 24 May 2006 13:50:11 +0000 (13:50 +0000)
committergarvinhicking <garvinhicking>
Wed, 24 May 2006 13:50:11 +0000 (13:50 +0000)
plugins/serendipity_event_mailer/serendipity_event_mailer.php

index 6cb9cbfb0c0f956baad2a3fe7f0b64df12bc31ee..d4972996976e099ccd650982cc9333a30282a6e2 100644 (file)
@@ -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) . '...<br />';
-                            serendipity_sendMail($mailto, $mail['subject'], $mail['body'], $mail['from']);
+                            if (!empty($mailto)) {
+                                echo htmlspecialchars($mailto) . '...<br />';
+                                serendipity_sendMail($mailto, $mail['subject'], $mail['body'], $mail['from']);
+                            }
                         }
                     }
                     return true;