[kronolith] CVS patch: don't send reminder if there was no mail address

W. Tasin tasin at fhm.edu
Fri Apr 2 03:58:26 PST 2004


Hi,

here's another patch concerning the reminder stuff.
This one prevents reminder.php mailing to "@localhost".
Ciao

Walter

-- 
oohhh sveglia.... il mondo e' ammalato, ma x colpa di chi.........
(Zucchero)
:-------W._Tasin,_FB_04,_FHM-------------------PGP-KeyID:0x7961A645---:
<Key-Fingerprint: 1610 835F 0080 32F4 6140  6CF7 A7D0 44CD 7961A645>
<http://wwwkeys.pgp.net:11371/pks/lookup?op=index&search=0x7961A645&fingerprint=on>

-------------- next part --------------
--- /home/tasin/horde/CVS-HORDE/horde/kronolith/lib/Scheduler/kronolith.php	Thu Mar  4 05:17:44 2004
+++ kronolith/lib/Scheduler/kronolith.php	Fri Apr  2 13:43:25 2004
@@ -140,6 +140,14 @@
 
         $mime->addPart($body);
         $msg_headers->addMIMEHeaders($mime);
+
+        if (empty($recipients)) {
+          Horde::logMessage(sprintf('Cannot get a mail address for sending reminder %s to recipient(s): %s %s', $event->title, implode(', ', $users), implode(', ', $groups)), __FILE__, __LINE__, PEAR_LOG_ERR);
+          return;
+
+        } else {
+          Horde::logMessage(sprintf('Sending reminder %s to %s', $event->title, implode(', ', $recipients)), __FILE__, __LINE__, PEAR_LOG_DEBUG);
+        }
         return $mime->send(implode(', ', $recipients), $msg_headers);
     }
 



More information about the kronolith mailing list