PM 940 "ProcessMaker-MA "Email Server (endpoints)"" SOLVED
> ProcessMaker-MA "Email Server (endpoints)"
- Se han implementado los siguientes Endpoints:
GET /api/1.0/{workspace}/email/paged?filter={filter}&start={start}&limit={limit}
GET /api/1.0/{workspace}/emails?filter={filter}&start={start}&limit={limit}
GET /api/1.0/{workspace}/email/{mess_uid}
POST /api/1.0/{workspace}/email
POST /api/1.0/{workspace}/email/test-connection
PUT /api/1.0/{workspace}/email/{mess_uid}
DELETE /api/1.0/{workspace}/email/{mess_uid}
- Se esta creando un 1er registro en la tabla EMAIL_SERVER, esto al ejecutar el comando "./processmaker upgrade".
- El metodo "System::getEmailConfiguration()" recupera el EMAIL_SERVER por default, caso contrario trabajara como lo
hacia anteriormente.
This commit is contained in:
@@ -968,11 +968,39 @@ class System
|
||||
|
||||
public function getEmailConfiguration ()
|
||||
{
|
||||
G::LoadClass( 'configuration' );
|
||||
$conf = new Configurations();
|
||||
$config = $conf->load( 'Emails' );
|
||||
$emailServer = new ProcessMaker\BusinessModel\EmailServer();
|
||||
|
||||
return $config;
|
||||
$arrayEmailServerDefault = $emailServer->getEmailServerDefault();
|
||||
|
||||
if (count($arrayEmailServerDefault) > 0) {
|
||||
//Return
|
||||
return $arrayDataEmailServerConfig = array(
|
||||
"MESS_ENGINE" => $arrayEmailServerDefault["MESS_ENGINE"],
|
||||
"MESS_SERVER" => $arrayEmailServerDefault["MESS_SERVER"],
|
||||
"MESS_PORT" => (int)($arrayEmailServerDefault["MESS_PORT"]),
|
||||
"MESS_RAUTH" => (int)($arrayEmailServerDefault["MESS_RAUTH"]),
|
||||
"MESS_ACCOUNT" => $arrayEmailServerDefault["MESS_ACCOUNT"],
|
||||
"MESS_PASSWORD" => $arrayEmailServerDefault["MESS_PASSWORD"],
|
||||
"MESS_FROM_MAIL" => $arrayEmailServerDefault["MESS_FROM_MAIL"],
|
||||
"MESS_FROM_NAME" => $arrayEmailServerDefault["MESS_FROM_NAME"],
|
||||
"SMTPSecure" => $arrayEmailServerDefault["SMTPSECURE"],
|
||||
"MESS_TRY_SEND_INMEDIATLY" => (int)($arrayEmailServerDefault["MESS_TRY_SEND_INMEDIATLY"]),
|
||||
"MAIL_TO" => $arrayEmailServerDefault["MAIL_TO"],
|
||||
"MESS_DEFAULT" => (int)($arrayEmailServerDefault["MESS_DEFAULT"]),
|
||||
"MESS_ENABLED" => 1,
|
||||
"MESS_BACKGROUND" => "",
|
||||
"MESS_PASSWORD_HIDDEN" => "",
|
||||
"MESS_EXECUTE_EVERY" => "",
|
||||
"MESS_SEND_MAX" => ""
|
||||
);
|
||||
} else {
|
||||
G::LoadClass("configuration");
|
||||
|
||||
$conf = new Configurations();
|
||||
$config = $conf->load("Emails");
|
||||
|
||||
return $config;
|
||||
}
|
||||
}
|
||||
|
||||
public function getSkingList ()
|
||||
|
||||
Reference in New Issue
Block a user