WIP SpamTitan integration:

- Get email body and send it to spamTitan action handler
This commit is contained in:
Hadi Nategh 2017-05-31 18:10:32 +02:00
parent a9c751e6a5
commit dd598259ed

View File

@ -889,12 +889,17 @@ class mail_ui
$response = Api\Json\Response::get(); $response = Api\Json\Response::get();
if ($GLOBALS['egw_info']['apps']['stylite']) if ($GLOBALS['egw_info']['apps']['stylite'])
{ {
$data = array_merge($_params, array( $id_parts = self::splitRowID($_params['data']['row_id']);
'userpwd' => $this->mail_bo->icServer['params']['acc_imap_password'], if ($id_parts['profileID'] && $id_parts['profileID'] != $this->mail_bo->profileID)
'user' => $this->mail_bo->icServer['params']['acc_imap_username'], {
'api_url' => $this->mail_bo->icServer['params']['acc_spam_api'] $this->changeProfile($id_parts['profileID']);
}
$_params['mailbody'] = $this->get_load_email_data($_params['data']['uid'], null, $id_parts['folder']);
$msg[] = stylite_mail_spamtitan::execSpamTitanAction($_action, $_params, array(
'userpwd' => $this->mail_bo->icServer->acc_imap_password,
'user' => $this->mail_bo->icServer->acc_imap_username,
'api_url' => $this->mail_bo->icServer->acc_spam_api
)); ));
$msg[] = stylite_mail_spamtitan::execSpamTitanAction($_action, $_params, $data);
} }
switch ($_action) switch ($_action)
{ {