From 0d802b54e054a5e80a1b79cfcf1ca4849087c4c0 Mon Sep 17 00:00:00 2001 From: "Duck (Jakob Munih)" Date: Sun, 22 Feb 2009 22:11:54 +0100 Subject: [PATCH] Use new Mime class --- folks/scripts/mail.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/folks/scripts/mail.php b/folks/scripts/mail.php index f582da279..2aed62bd0 100644 --- a/folks/scripts/mail.php +++ b/folks/scripts/mail.php @@ -128,15 +128,13 @@ while ($row =& $res->fetchRow()) { $body2 = sprintf($body, $row[0], $registry->get('name', 'horde'), Folks::getUrlFor('user', $row[0], true, -1)); // Send mail - $mail = new Horde_Mime_Mail($subject, $body2, $row[1], $conf['support'], NLS::getCharset()); - try { - $mail->addHeader('User-Agent', 'Folks' . FOLKS_VERSION); - } catch (Horde_Mime_Exception $e) {} - try { - $mail->send($conf['mailer']['type'], $conf['mailer']['params']); + $mail = new MIME_Mail($subject, $body2, $row[1], $conf['support'], NLS::getCharset()); + $mail->addHeader('User-Agent', 'Folks' . FOLKS_VERSION); + $sent = $mail->send($conf['mailer']['type'], $conf['mailer']['params']); + if ($sent instanceof PEAR_Error) { + $cli->message($sent, 'cli.warning'); + } else { $cli->message($row[0], 'cli.success'); - } catch (Horde_Mime_Exception $e) { - $cli->message($e, 'cli.warning'); } // sleep(1); -- 2.11.0