mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
error_log if calendar can not send notifications
This commit is contained in:
parent
57349e6386
commit
315ceed672
@ -75,7 +75,7 @@ class Mailer extends Horde_Mime_Mail
|
||||
|
||||
if ($account !== false)
|
||||
{
|
||||
$this->_headers->setUserAgent('EGroupware API '.$GLOBALS['egw_info']['server']['versions']['phpgwapi']);
|
||||
$this->_headers->setUserAgent('EGroupware API '.$GLOBALS['egw_info']['server']['versions']['api']);
|
||||
|
||||
$this->setAccount($account);
|
||||
|
||||
@ -596,7 +596,7 @@ class Mailer extends Horde_Mime_Mail
|
||||
if ($GLOBALS['egw_info']['server']['log_mail'])
|
||||
{
|
||||
$msg = $GLOBALS['egw_info']['server']['log_mail'] !== true ? date('Y-m-d H:i:s')."\n" : '';
|
||||
$msg .= (isset($e) ? 'Mail send' : 'Mail NOT send').
|
||||
$msg .= (!isset($e) ? 'Mail send' : 'Mail NOT send').
|
||||
' to '.implode(', ', $to).' with subject: "'.$subject.'"';
|
||||
|
||||
$msg .= ' from instance '.$GLOBALS['egw_info']['user']['domain'].' and IP '.Session::getuser_ip();
|
||||
|
@ -828,7 +828,6 @@ class calendar_boupdate extends calendar_bo
|
||||
$event = $msg_type == MSG_ADDED || $msg_type == MSG_MODIFIED ? $new_event : $old_event;
|
||||
|
||||
// add all group-members to the notification, unless they are already participants
|
||||
$contact_obj = false;
|
||||
foreach($to_notify as $userid => $statusid)
|
||||
{
|
||||
if (is_numeric($userid) && $GLOBALS['egw']->accounts->get_type($userid) == 'g' &&
|
||||
@ -1047,6 +1046,10 @@ class calendar_boupdate extends calendar_bo
|
||||
|
||||
if(is_array($attachment)) { $notification->set_attachments(array($attachment)); }
|
||||
$notification->send();
|
||||
foreach(notifications::errors(true) as $error)
|
||||
{
|
||||
error_log(__METHOD__."() Error notifying $userid from $senderid: $subject: $error");
|
||||
}
|
||||
}
|
||||
catch (Exception $exception) {
|
||||
error_log(__METHOD__.' error while notifying user '.$userid.':'.$exception->getMessage());
|
||||
|
Loading…
Reference in New Issue
Block a user