Skip to content

EspoCRM – Open Source CRM Application

rename

Yuri Kuznetsov50b7f2cf3055
diff --git a/application/Espo/Classes/FieldProcessing/InboundEmail/IsSystemLoader.php b/application/Espo/Classes/FieldProcessing/InboundEmail/IsSystemLoader.php
index a2ea493fc8..bf54e3bca9 100644
--- a/application/Espo/Classes/FieldProcessing/InboundEmail/IsSystemLoader.php
+++ b/application/Espo/Classes/FieldProcessing/InboundEmail/IsSystemLoader.php
@@ -46,7 +46,7 @@ class IsSystemLoader implements Loader
public function process(Entity $entity, Params $params): void
{
- $isSystem = $entity->getEmailAddress() === $this->configDataProvider->getOutboundEmailFromAddress();
+ $isSystem = $entity->getEmailAddress() === $this->configDataProvider->getSystemOutboundAddress();
$entity->set('isSystem', $isSystem);
}
diff --git a/application/Espo/Core/Formula/Functions/ExtGroup/EmailGroup/SendType.php b/application/Espo/Core/Formula/Functions/ExtGroup/EmailGroup/SendType.php
index d6abc70dfa..352c0c0904 100644
--- a/application/Espo/Core/Formula/Functions/ExtGroup/EmailGroup/SendType.php
+++ b/application/Espo/Core/Formula/Functions/ExtGroup/EmailGroup/SendType.php
@@ -102,7 +102,7 @@ class SendType extends BaseFunction implements
if (!$email->get('from')) {
$from = $this->injectableFactory
->create(ConfigDataProvider::class)
- ->getOutboundEmailFromAddress();
+ ->getSystemOutboundAddress();
if ($from) {
$email->set('from', $from);
diff --git a/application/Espo/Core/Mail/Account/SendingAccountProvider.php b/application/Espo/Core/Mail/Account/SendingAccountProvider.php
index 602c0624df..5d97cde104 100644
--- a/application/Espo/Core/Mail/Account/SendingAccountProvider.php
+++ b/application/Espo/Core/Mail/Account/SendingAccountProvider.php
@@ -216,7 +216,7 @@ class SendingAccountProvider
private function loadSystem(): void
{
- $address = $this->configDataProvider->getOutboundEmailFromAddress();
+ $address = $this->configDataProvider->getSystemOutboundAddress();
if (!$address) {
return;
diff --git a/application/Espo/Core/Mail/Account/SystemSettingsAccount.php b/application/Espo/Core/Mail/Account/SystemSettingsAccount.php
index 90a53596b8..f4709a9216 100644
--- a/application/Espo/Core/Mail/Account/SystemSettingsAccount.php
+++ b/application/Espo/Core/Mail/Account/SystemSettingsAccount.php
@@ -71,7 +71,7 @@ class SystemSettingsAccount implements Account
public function getEmailAddress(): ?string
{
- return $this->configDataProvider->getOutboundEmailFromAddress();
+ return $this->configDataProvider->getSystemOutboundAddress();
}
public function getAssignedUser(): ?Link
diff --git a/application/Espo/Core/Mail/ConfigDataProvider.php b/application/Espo/Core/Mail/ConfigDataProvider.php
index 1c8f8eee54..cabe9b30cb 100644
--- a/application/Espo/Core/Mail/ConfigDataProvider.php
+++ b/application/Espo/Core/Mail/ConfigDataProvider.php
@@ -37,7 +37,7 @@ class ConfigDataProvider
private Config $config,
) {}
- public function getOutboundEmailFromAddress(): ?string
+ public function getSystemOutboundAddress(): ?string
{
return $this->config->get('outboundEmailFromAddress');
}
diff --git a/application/Espo/Core/Mail/Sender.php b/application/Espo/Core/Mail/Sender.php
index 010cbb03f7..708afd8cb2 100644
--- a/application/Espo/Core/Mail/Sender.php
+++ b/application/Espo/Core/Mail/Sender.php
@@ -372,11 +372,11 @@ class Sender
if ($fromAddress) {
$fromAddress = trim($fromAddress);
} else {
- if (empty($params['fromAddress']) && !$this->configDataProvider->getOutboundEmailFromAddress()) {
+ if (empty($params['fromAddress']) && !$this->configDataProvider->getSystemOutboundAddress()) {
throw new NoSmtp('outboundEmailFromAddress is not specified in config.');
}
- $fromAddress = $params['fromAddress'] ?? $this->configDataProvider->getOutboundEmailFromAddress();
+ $fromAddress = $params['fromAddress'] ?? $this->configDataProvider->getSystemOutboundAddress();
$email->setFromAddress($fromAddress);
}
diff --git a/application/Espo/Modules/Crm/Tools/MassEmail/SendingProcessor.php b/application/Espo/Modules/Crm/Tools/MassEmail/SendingProcessor.php
index 17e666f992..9cebe28f9c 100644
--- a/application/Espo/Modules/Crm/Tools/MassEmail/SendingProcessor.php
+++ b/application/Espo/Modules/Crm/Tools/MassEmail/SendingProcessor.php
@@ -530,7 +530,7 @@ class SendingProcessor
$senderParams = $senderParams->withFromAddress(
$massEmail->getFromAddress() ??
- $this->configDataProvider->getOutboundEmailFromAddress()
+ $this->configDataProvider->getSystemOutboundAddress()
);
if ($massEmail->getFromName()) {
diff --git a/application/Espo/Tools/App/AppService.php b/application/Espo/Tools/App/AppService.php
index f8f053aee3..def9f0b947 100644
--- a/application/Espo/Tools/App/AppService.php
+++ b/application/Espo/Tools/App/AppService.php
@@ -258,7 +258,7 @@ class AppService
$user = $this->user;
$outboundEmailIsShared = $this->config->get('outboundEmailIsShared');
- $outboundEmailFromAddress = $this->emailConfigDataProvider->getOutboundEmailFromAddress();
+ $outboundEmailFromAddress = $this->emailConfigDataProvider->getSystemOutboundAddress();
$emailAddressList = [];
$userEmailAddressList = [];
diff --git a/application/Espo/Tools/App/SettingsService.php b/application/Espo/Tools/App/SettingsService.php
index f12906b71e..26c01dde88 100644
--- a/application/Espo/Tools/App/SettingsService.php
+++ b/application/Espo/Tools/App/SettingsService.php
@@ -254,7 +254,7 @@ class SettingsService
if (
(
- $this->emailConfigDataProvider->getOutboundEmailFromAddress() ||
+ $this->emailConfigDataProvider->getSystemOutboundAddress() ||
$this->config->get('internalSmtpServer')
) &&
!$this->config->get('passwordRecoveryDisabled')
diff --git a/application/Espo/Tools/Email/SendService.php b/application/Espo/Tools/Email/SendService.php
index 00fc90dc30..fe89414e59 100644
--- a/application/Espo/Tools/Email/SendService.php
+++ b/application/Espo/Tools/Email/SendService.php
@@ -128,7 +128,7 @@ class SendService
$systemIsShared = $this->config->get('outboundEmailIsShared');
$systemFromName = $this->config->get('outboundEmailFromName');
- $systemFromAddress = $this->configDataProvider->getOutboundEmailFromAddress();
+ $systemFromAddress = $this->configDataProvider->getSystemOutboundAddress();
$emailSender = $this->emailSender->create();
diff --git a/tests/unit/Espo/Core/Mail/EmailSenderTest.php b/tests/unit/Espo/Core/Mail/EmailSenderTest.php
index 59253a83ad..c953a94194 100644
--- a/tests/unit/Espo/Core/Mail/EmailSenderTest.php
+++ b/tests/unit/Espo/Core/Mail/EmailSenderTest.php
@@ -107,7 +107,7 @@ class EmailSenderTest extends TestCase
$configDataProvider
->expects($this->any())
- ->method('getOutboundEmailFromAddress')
+ ->method('getSystemOutboundAddress')
->willReturn(null);
}