PMC-40: Action by Email: Email response configuration

This commit is contained in:
Gustavo Silva
2018-11-14 15:00:10 -04:00
committed by Ronald Q
parent 48e870fab3
commit ab11f33747
8 changed files with 1033 additions and 268 deletions

View File

@@ -12,19 +12,20 @@ return [
'log' => env('APP_LOG', 'single'),
'log_level' => env('APP_LOG_LEVEL', 'debug'),
'cache_lifetime' => env('APP_CACHE_LIFETIME', 60),
'key' => env('APP_KEY', 'base64:rU28h/tElUn/eiLY0qC24jJq1rakvAFRoRl1DWxj/kM='),
'cipher' => 'AES-256-CBC',
'providers' => [
FilesystemServiceProvider::class,
CacheServiceProvider::class,
ViewServiceProvider::class,
FilesystemServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class,
ViewServiceProvider::class
],
'aliases' => [
'Crypt' => Illuminate\Support\Facades\Crypt::class
],
];

File diff suppressed because it is too large Load Diff

View File

@@ -50,6 +50,26 @@ class SpoolRun
$this->mailEreg = "/^([\w\-_\+\.']+@[\w\-_\.]+\.\w{2,5}+)$/";
}
/**
* Set the $spool_id
*
* @param string
*/
public function setSpoolId($v)
{
$this->spool_id = $v;
}
/**
* Get the $spool_id
*
* @return string
*/
public function getSpoolId()
{
return $this->spool_id;
}
/**
* get all files into spool in a list
*

View File

@@ -5,6 +5,7 @@ use ProcessMaker\BusinessModel\EmailServer;
use ProcessMaker\ChangeLog\ChangeLog;
/*----------------------------------********---------------------------------*/
use ProcessMaker\Core\System;
use ProcessMaker\Util\WsMessageResponse;
class WsBase
{
@@ -947,7 +948,8 @@ class WsBase
$spool->sendMail();
if ($spool->status == 'sent') {
$result = new WsResponse(0, G::loadTranslation('ID_MESSAGE_SENT') . ": " . $to);
$result = new WsMessageResponse(0, G::loadTranslation('ID_MESSAGE_SENT') . ": " . $to);
$result->setAppMessUid($spool->getSpoolId());
} else {
$result = new WsResponse(29, $spool->status . ' ' . $spool->error . print_r($setup, 1));
}

View File

@@ -300,5 +300,24 @@ class AppMessage extends BaseAppMessage
return $messages;
}
/**
* Get the APP_MSG_BODY related to the key
*
* @param string $key
*
* @return string
* @throws Exception
*/
public static function getAppMsgBodyByKey($key)
{
try {
$appMessage = AppMessagePeer::retrieveByPk($key);
return $appMessage->getAppMsgBody();
} catch (Exception $error) {
throw $error;
}
}
}

View File

@@ -1699,6 +1699,12 @@ msgstr "3 days at least"
msgid "The answer has been submitted. Thank you."
msgstr "The answer has been submitted. Thank you."
# TRANSLATION
# LABEL/ID_ABE_EMAIL_RESPONSE_BODY_NOTE
#: LABEL/ID_ABE_EMAIL_RESPONSE_BODY_NOTE
msgid "Please add your comments above this section. Don't modify or delete this section."
msgstr "Please add your comments above this section. Don't modify or delete this section."
# TRANSLATION
# LABEL/ID_ABE_FORM_ALREADY_FILLED
#: LABEL/ID_ABE_FORM_ALREADY_FILLED
@@ -4235,6 +4241,12 @@ msgstr "Close Editor"
msgid "[LABEL/ID_CODE] Code"
msgstr "Code"
# TRANSLATION
# LABEL/ID_CODE_CRYPT
#: LABEL/ID_CODE_CRYPT
msgid "Code:"
msgstr "Code:"
# TRANSLATION
# LABEL/ID_COLLAPSE_ALL
#: LABEL/ID_COLLAPSE_ALL

View File

@@ -57081,6 +57081,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','HTML_FILES','en','You can open only files with the .html extension','2014-01-15') ,
( 'LABEL','ID_3DAYSMINIMUM','en','3 days at least','2014-01-15') ,
( 'LABEL','ID_ABE_ANSWER_SUBMITTED','en','The answer has been submitted. Thank you.','2017-06-19') ,
( 'LABEL','ID_ABE_EMAIL_RESPONSE_BODY_NOTE','en','Please add your comments above this section. Don''t modify or delete this section.','2018-11-16') ,
( 'LABEL','ID_ABE_FORM_ALREADY_FILLED','en','The form has already been filled and sent.','2017-06-09') ,
( 'LABEL','ID_ABE_INFORMATION_SUBMITTED','en','The information was submitted. Thank you.','2017-06-19') ,
( 'LABEL','ID_ABE_RESPONSE_SENT','en','The response has already been sent.','2017-06-19') ,
@@ -57513,6 +57514,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_CLOSE','en','Close','2014-01-15') ,
( 'LABEL','ID_CLOSE_EDITOR','en','Close Editor','2014-01-15') ,
( 'LABEL','ID_CODE','en','Code','2014-01-15') ,
( 'LABEL','ID_CODE_CRYPT','en','Code:','2018-11-16') ,
( 'LABEL','ID_COLLAPSE_ALL','en','Collapse All','2014-01-15') ,
( 'LABEL','ID_COLOSA_AND_CERTIFIED_PARTNERS','en','Supplied free of charge with no support, certification, warranty, maintenance nor indemnity by Colosa and its Certified Partners.','2014-10-21') ,
( 'LABEL','ID_COLUMNS','en','columns','2014-01-15') ,

View File

@@ -0,0 +1,32 @@
<?php
namespace ProcessMaker\Util;
use WsResponse;
class WsMessageResponse extends WsResponse
{
private $appMessUid = null;
/**
* Get the appMessUid
*
* @return array
*/
public function getAppMessUid()
{
return $this->appMessUid;
}
/**
* Set the appMessUid
*
* @param string $v
* @return void
*/
public function setAppMessUid($v)
{
$this->appMessUid = $v;
}
}