This commit is contained in:
Yuri Kuznetsov
2025-06-25 10:45:22 +03:00
parent 09b94de327
commit 07b79c49fe
5 changed files with 5 additions and 5 deletions
@@ -88,7 +88,7 @@ class CheckFromAddress implements SaveHook
if (
$system &&
$this->configDataProvider->isOutboundEmailShared() &&
$this->configDataProvider->isSystemOutboundAddressShared() &&
$system->getEmailAddress() &&
$fromAddress === strtolower($system->getEmailAddress())
) {
@@ -42,7 +42,7 @@ class ConfigDataProvider
return $this->config->get('outboundEmailFromAddress');
}
public function isOutboundEmailShared(): bool
public function isSystemOutboundAddressShared(): bool
{
return (bool) $this->config->get('outboundEmailIsShared');
}
+1 -1
View File
@@ -281,7 +281,7 @@ class AppService
{
$user = $this->user;
$outboundEmailIsShared = $this->emailConfigDataProvider->isOutboundEmailShared();
$outboundEmailIsShared = $this->emailConfigDataProvider->isSystemOutboundAddressShared();
$outboundEmailFromAddress = $this->emailConfigDataProvider->getSystemOutboundAddress();
$emailAddressList = [];
@@ -370,7 +370,7 @@ class SettingsService
if (
!$this->acl->checkScope(Email::ENTITY_TYPE, Acl\Table::ACTION_CREATE) ||
!$this->emailConfigDataProvider->isOutboundEmailShared()
!$this->emailConfigDataProvider->isSystemOutboundAddressShared()
) {
unset($data->outboundEmailFromAddress);
unset($data->outboundEmailFromName);
+1 -1
View File
@@ -130,7 +130,7 @@ class SendService
throw new BadRequest("Empty To address.");
}
$systemIsShared = $this->configDataProvider->isOutboundEmailShared();
$systemIsShared = $this->configDataProvider->isSystemOutboundAddressShared();
$systemFromName = $this->config->get('outboundEmailFromName');
$systemFromAddress = $this->configDataProvider->getSystemOutboundAddress();