HOR-2155-E "Send notification in run..."
HOR-2155-E "Send notification in run..."
This commit is contained in:
@@ -5198,13 +5198,6 @@ class Cases
|
||||
if (!class_exists('System')) {
|
||||
G::LoadClass('system');
|
||||
}
|
||||
$aConfiguration = System::getEmailConfiguration();
|
||||
|
||||
$msgError = "";
|
||||
if (!isset($aConfiguration['MESS_ENABLED']) || $aConfiguration['MESS_ENABLED'] != '1') {
|
||||
$msgError = "The default configuration wasn't defined";
|
||||
$aConfiguration['MESS_ENGINE'] = '';
|
||||
}
|
||||
|
||||
//Send derivation notification - Start
|
||||
$oTask = new Task();
|
||||
@@ -5214,6 +5207,31 @@ class Cases
|
||||
return false;
|
||||
}
|
||||
|
||||
$emailServer = new \ProcessMaker\BusinessModel\EmailServer();
|
||||
|
||||
$emailServerUid = $aTaskInfo['TAS_EMAIL_SERVER_UID'];
|
||||
|
||||
if ($emailServerUid != '') {
|
||||
$aConfiguration = $emailServer->getEmailServer($emailServerUid, true);
|
||||
$aConfiguration['SMTPSecure'] = $aConfiguration['SMTPSECURE'];
|
||||
} else {
|
||||
$aConfiguration = $emailServer->getEmailServerDefault();
|
||||
$aConfiguration['SMTPSecure'] = $aConfiguration['SMTPSECURE'];
|
||||
}
|
||||
|
||||
$msgError = '';
|
||||
|
||||
if (empty($aConfiguration)) {
|
||||
$msgError = G::LoadTranslation('ID_THE_DEFAULT_CONFIGURATION');
|
||||
}
|
||||
|
||||
if ($aTaskInfo['TAS_NOT_EMAIL_FROM_FORMAT']) {
|
||||
$fromName = $aConfiguration['MESS_FROM_NAME'];
|
||||
$fromMail = $aConfiguration['MESS_FROM_MAIL'];
|
||||
|
||||
$from = $fromName . (($fromMail != '')? ' <' . $fromMail . '>' : '');
|
||||
}
|
||||
|
||||
$from = G::buildFrom($aConfiguration, $from);
|
||||
|
||||
if (isset($aTaskInfo['TAS_DEF_SUBJECT_MESSAGE']) && $aTaskInfo['TAS_DEF_SUBJECT_MESSAGE'] != '') {
|
||||
|
||||
@@ -27641,6 +27641,12 @@ msgstr "The case was already derivated to other person. Try to open again the ca
|
||||
msgid "The case is paused and can't be reasigned."
|
||||
msgstr "The case is paused and can't be reasigned."
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_THE_DEFAULT_CONFIGURATION
|
||||
#: LABEL/ID_THE_DEFAULT_CONFIGURATION
|
||||
msgid "The default configuration wasn't defined"
|
||||
msgstr "The default configuration wasn't defined"
|
||||
|
||||
# TRANSLATION
|
||||
# LABEL/ID_MAFE_1de162d73f017a9243ce0c939064a014
|
||||
#: LABEL/ID_MAFE_1de162d73f017a9243ce0c939064a014
|
||||
@@ -50912,4 +50918,3 @@ msgstr "Cancel"
|
||||
#: button - PME_ACCEPT
|
||||
msgid "[dynaforms/fields/yesno.xml?PME_ACCEPT] Save"
|
||||
msgstr "Save"
|
||||
|
||||
|
||||
@@ -6153,6 +6153,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
||||
( 'LABEL','ID_CASE_CANCELLED_PARALLEL','en','To cancel a case, no parallel threads must be active. Only cases with one active thread can be canceled.','2016-08-11') ,
|
||||
( 'LABEL','ID_REASSIGNMENT_ERROR','en','The case was already derivated to other person. Try to open again the case to reassign.','2016-08-12') ,
|
||||
( 'LABEL','ID_REASSIGNMENT_PAUSED_ERROR','en','The case is paused and can''t be reasigned.','2016-08-12') ,
|
||||
( 'LABEL','ID_THE_DEFAULT_CONFIGURATION','en','The default configuration was not defined','2016-11-16'),
|
||||
( 'LABEL','ID_MAFE_1de162d73f017a9243ce0c939064a014','en','Enable gallery','2016-08-12') ,
|
||||
( 'LABEL','ID_MAFE_4e357e7345689cff230335282b201a11','en','Enable camera','2016-08-12') ,
|
||||
( 'LABEL','ID_MAFE_5582ead0a9ee86a54da29c20caee6f57','en','Force user login','2016-08-12') ,
|
||||
|
||||
@@ -170,14 +170,7 @@ try {
|
||||
$oUser = new Users();
|
||||
$aUser = $oUser->load($_SESSION['USER_LOGGED']);
|
||||
$fromName = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
|
||||
$oTask = new Task();
|
||||
$oTaskEmailSetting = $oTask->getEmailServerSettingsForNotification($_SESSION['PROCESS'], $_SESSION['TASK']);
|
||||
if ($oTaskEmailSetting['TAS_NOT_EMAIL_FROM_FORMAT']) {
|
||||
$oEmailServer = new \ProcessMaker\BusinessModel\EmailServer();
|
||||
$dataSettings = $oEmailServer->getEmailServerDefault();
|
||||
$aUser['USR_EMAIL'] = $dataSettings['MESS_FROM_MAIL'];
|
||||
$fromName = $dataSettings['MESS_FROM_NAME'];
|
||||
}
|
||||
|
||||
$sFromData = $fromName . ($aUser['USR_EMAIL'] != '' ? ' <' . $aUser['USR_EMAIL'] . '>' : '');
|
||||
|
||||
$flagGmail = false;
|
||||
|
||||
Reference in New Issue
Block a user