$alt->setBasePart($alternative);
/* Send. */
- list($mail_driver, $mail_params) = Horde::getMailerConfig();
- $result = $alt->send($mail_driver, $mail_params);
+ $result = $alt->send(Horde::getMailerConfig());
if (is_a($result, 'PEAR_Error')) {
$notification->push(sprintf(_("There was an error sending your message: %s"), $result->getMessage()), 'horde.error');
} else {
//FIXME: This address should be configurable
$mail->addHeader('Sender',
'horde-problem@' . $conf['report_content']['maildomain']);
- list($mail_driver, $mail_params) = Horde::getMailerConfig();
- return $mail->send($mail_driver, $mail_params);
+ return $mail->send(Horde::getMailerConfig());
}
}
*/
static public function folderPref($folder, $append)
{
+ if (!isset($GLOBALS['imp_imap'])) var_dump(debug_backtrace());
$def_ns = $GLOBALS['imp_imap']->defaultNamespace();
$empty_ns = $GLOBALS['imp_imap']->getNamespace('');
$icon = Horde::img('alerts/success.png', _("Success"), null, $graphicsdir);
$sig_text = $sig_result->message;
+ $success = true;
} catch (Horde_Exception $e) {
- $icon = Horde::img('alerts/warning.png', _("Warning"), null, $graphicsdir);
+ $icon = Horde::img('alerts/error.png', _("Error"), null, $graphicsdir);
$sig_text = $e->getMessage();
+ $success = false;
}
$ret[$base_id]['status'][] = array(
'icon' => $icon,
+ 'success' => $success,
'text' => array(
Horde_Text_Filter::filter($sig_text, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::NOHTML))
)
$myemail = explode('@', $myemail);
$from = Horde_Mime_Address::writeAddress($myemail[0], isset($myemail[1]) ? $myemail[1] : '', $ident->getValue('fullname'));
- $mail_driver = $conf['mailer']['type'];
- $mail_params = $conf['mailer']['params'];
- if ($mail_driver == 'smtp' && $mail_params['auth'] &&
- empty($mail_params['username'])) {
- $mail_params['username'] = Horde_Auth::getAuth();
- $mail_params['password'] = Horde_Auth::getCredential('password');
- }
-
$share = &$GLOBALS['kronolith_shares']->getShare($event->getCalendar());
foreach ($attendees as $email => $status) {
$mail->addMimePart($ics);
try {
- $mail->send($mail_driver, $mail_params);
+ $mail->send(Horde::getMailerConfig());
$notification->push(
sprintf(_("The event notification to %s was successfully sent."), $recipient),
'horde.success'
return;
}
- $mail_driver = $conf['mailer']['type'];
- $mail_params = $conf['mailer']['params'];
- if ($mail_driver == 'smtp' && $mail_params['auth'] &&
- empty($mail_params['username'])) {
- $mail_params['username'] = Horde_Auth::getAuth();
- $mail_params['password'] = Horde_Auth::getCredential('password');
- }
-
foreach ($addresses as $lang => $twentyFour) {
Horde_Nls::setLang($lang);
implode(',', $df_recipients),
$from,
Horde_Nls::getCharset());
+ $mail->addHeader('User-Agent', 'Kronolith ' . $GLOBALS['registry']->getVersion());
$mime_mail->setBody($message, Horde_Nls::getCharset(), true);
Horde::logMessage(sprintf('Sending event notifications for %s to %s', $event->title, implode(', ', $df_recipients)), __FILE__, __LINE__, PEAR_LOG_DEBUG);
try {
- $mime_mail->send($mail_driver, $mail_params, false, false);
+ $mime_mail->send(Horde::getMailerConfig(), false, false);
} catch (Horde_Mime_Exception $e) {}
}
}
$email,
$GLOBALS['conf']['reminder']['from_addr'],
Horde_Nls::getCharset());
+ $mime_mail->addHeader('User-Agent', 'Kronolith ' . $registry->getVersion());
- $mail_driver = $GLOBALS['conf']['mailer']['type'];
- $mail_params = $GLOBALS['conf']['mailer']['params'];
- if ($mail_driver == 'smtp' && $mail_params['auth'] &&
- empty($mail_params['username'])) {
- Horde::logMessage('Agenda Notifications don\'t work with user based SMTP authentication.',
- __FILE__, __LINE__, PEAR_LOG_ERR);
- return;
- }
$pad = max(Horde_String::length(_("All day")) + 2, $twentyFour ? 6 : 8);
$message = sprintf(_("Your daily agenda for %s"),
Horde::logMessage(sprintf('Sending daily agenda to %s', $email),
__FILE__, __LINE__, PEAR_LOG_DEBUG);
try {
- $mime_mail->send($mail_driver, $mail_params, false, false);
+ $mime_mail->send(Horde::getMailerConfig(), false, false);
} catch (Horde_Mime_Exception $e) {}
}
}
return;
}
- list($mail_driver, $mail_params) = Horde::getMailerConfig();
$mail = new Horde_Mime_Mail();
$mail->addHeader('User-Agent', 'Nag ' . $GLOBALS['registry']->getVersion());
$mail->addHeader('Precedence', 'bulk');
Horde::logMessage(sprintf('Sending event notifications for %s to %s',
$task->name, implode(', ', $df_recipients)),
__FILE__, __LINE__, PEAR_LOG_INFO);
- $sent = $mail->send($mail_driver, $mail_params);
+ $sent = $mail->send(Horde::getMailerConfig());
if (is_a($sent, 'PEAR_Error')) {
return $sent;
}