EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
rename
Yuri Kuznetsov07b79c49fe52
diff --git a/application/Espo/Classes/RecordHooks/Email/CheckFromAddress.php b/application/Espo/Classes/RecordHooks/Email/CheckFromAddress.phpindex bf73c71a5c..7e834210ce 100644--- a/application/Espo/Classes/RecordHooks/Email/CheckFromAddress.php+++ b/application/Espo/Classes/RecordHooks/Email/CheckFromAddress.php@@ -88,7 +88,7 @@ class CheckFromAddress implements SaveHookif ($system &&- $this->configDataProvider->isOutboundEmailShared() &&+ $this->configDataProvider->isSystemOutboundAddressShared() &&$system->getEmailAddress() &&$fromAddress === strtolower($system->getEmailAddress())) {diff --git a/application/Espo/Core/Mail/ConfigDataProvider.php b/application/Espo/Core/Mail/ConfigDataProvider.phpindex b6c3b6f1c8..43e2b65a12 100644--- a/application/Espo/Core/Mail/ConfigDataProvider.php+++ b/application/Espo/Core/Mail/ConfigDataProvider.php@@ -42,7 +42,7 @@ class ConfigDataProviderreturn $this->config->get('outboundEmailFromAddress');}- public function isOutboundEmailShared(): bool+ public function isSystemOutboundAddressShared(): bool{return (bool) $this->config->get('outboundEmailIsShared');}diff --git a/application/Espo/Tools/App/AppService.php b/application/Espo/Tools/App/AppService.phpindex b88f60c618..1c0a8abf1b 100644--- a/application/Espo/Tools/App/AppService.php+++ b/application/Espo/Tools/App/AppService.php@@ -281,7 +281,7 @@ class AppService{$user = $this->user;- $outboundEmailIsShared = $this->emailConfigDataProvider->isOutboundEmailShared();+ $outboundEmailIsShared = $this->emailConfigDataProvider->isSystemOutboundAddressShared();$outboundEmailFromAddress = $this->emailConfigDataProvider->getSystemOutboundAddress();$emailAddressList = [];diff --git a/application/Espo/Tools/App/SettingsService.php b/application/Espo/Tools/App/SettingsService.phpindex c297517cee..4e40916499 100644--- a/application/Espo/Tools/App/SettingsService.php+++ b/application/Espo/Tools/App/SettingsService.php@@ -370,7 +370,7 @@ class SettingsServiceif (!$this->acl->checkScope(Email::ENTITY_TYPE, Acl\Table::ACTION_CREATE) ||- !$this->emailConfigDataProvider->isOutboundEmailShared()+ !$this->emailConfigDataProvider->isSystemOutboundAddressShared()) {unset($data->outboundEmailFromAddress);unset($data->outboundEmailFromName);diff --git a/application/Espo/Tools/Email/SendService.php b/application/Espo/Tools/Email/SendService.phpindex 099e0466dd..da60151e0a 100644--- a/application/Espo/Tools/Email/SendService.php+++ b/application/Espo/Tools/Email/SendService.php@@ -130,7 +130,7 @@ class SendServicethrow new BadRequest("Empty To address.");}- $systemIsShared = $this->configDataProvider->isOutboundEmailShared();+ $systemIsShared = $this->configDataProvider->isSystemOutboundAddressShared();$systemFromName = $this->config->get('outboundEmailFromName');$systemFromAddress = $this->configDataProvider->getSystemOutboundAddress();