mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
- Fixed bug with change tracking of TEXT attributes
- Log any email notification (successful or not) - Class selection always made through a Combo box - Automatic creation of indexes for external keys - New trigger: on object creation - Application log: added a status string - Added documentation to the WSDL (+ anyType replaced by string) - SOAP: improved handling of enumeration attributes - SOAP: returned logs to mention the name of the parameter as advertised in the WSDL file (different than the name of the attribute in Itop) - Finalized SOAP tests - Added a SOAP client example SVN:trunk[246]
This commit is contained in:
@@ -215,25 +215,28 @@ class ActionEmail extends ActionNotification
|
||||
$sHeaders .= "Bcc: $sBCC\r\n";
|
||||
}
|
||||
|
||||
// Mail it
|
||||
$oLog = new EventNotificationEmail();
|
||||
if (mail($sTo, $sSubject, $sBody, $sHeaders))
|
||||
{
|
||||
$oLog = new EventNotificationEmail();
|
||||
$oLog->Set('userinfo', UserRights::GetUser());
|
||||
$oLog->Set('trigger_id', $oTrigger->GetKey());
|
||||
$oLog->Set('action_id', $this->GetKey());
|
||||
$oLog->Set('object_id', $aContextArgs['this->id']);
|
||||
$oLog->Set('to', $sTo);
|
||||
$oLog->Set('cc', $sCC);
|
||||
$oLog->Set('bcc', $sBCC);
|
||||
$oLog->Set('subject', $sSubject);
|
||||
$oLog->Set('body', $sBody);
|
||||
$oLog->DBInsertNoReload();
|
||||
$oLog->Set('message', 'Notification sent');
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new CoreException('mail not sent', array('action'=>$this->GetKey(), 'to'=>$sTo, 'subject'=>$sSubject, 'headers'=>$sHeaders));
|
||||
$aLastError = error_get_last();
|
||||
$oLog->Set('message', 'Mail could not be sent: '.$aLastError['message']);
|
||||
//throw new CoreException('mail not sent', array('action'=>$this->GetKey(), 'to'=>$sTo, 'subject'=>$sSubject, 'headers'=>$sHeaders));
|
||||
}
|
||||
|
||||
$oLog->Set('userinfo', UserRights::GetUser());
|
||||
$oLog->Set('trigger_id', $oTrigger->GetKey());
|
||||
$oLog->Set('action_id', $this->GetKey());
|
||||
$oLog->Set('object_id', $aContextArgs['this->id']);
|
||||
$oLog->Set('to', $sTo);
|
||||
$oLog->Set('cc', $sCC);
|
||||
$oLog->Set('bcc', $sBCC);
|
||||
$oLog->Set('subject', $sSubject);
|
||||
$oLog->Set('body', $sBody);
|
||||
$oLog->DBInsertNoReload();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user