From 39ff1e318c1553daabbc0027e090a631c9a7c42a Mon Sep 17 00:00:00 2001 From: Stephen Abello Date: Thu, 17 May 2018 14:43:46 +0000 Subject: [PATCH] =?UTF-8?q?N=C2=B01319=20&=20N=C2=B01203:=20Refactored=20[?= =?UTF-8?q?r5750]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SVN:trunk[5800] --- core/email.class.inc.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/email.class.inc.php b/core/email.class.inc.php index 6dcebffc2..9bc500385 100644 --- a/core/email.class.inc.php +++ b/core/email.class.inc.php @@ -57,6 +57,7 @@ class EMail { $this->m_aData = array(); $this->m_oMessage = Swift_Message::newInstance(); + $this->SetRecipientFrom(MetaModel::GetConfig()->Get('email_default_sender_address'), MetaModel::GetConfig()->Get('email_default_sender_label')); } /** @@ -261,13 +262,10 @@ class EMail public function Send(&$aIssues, $bForceSynchronous = false, $oLog = null) { //select a default sender if none is provided. - if(empty($this->m_aData['from']['address'])) - { - $this->SetRecipientFrom(MetaModel::GetConfig()->Get('email_default_sender_address'), MetaModel::GetConfig()->Get('email_default_sender_label')); - if(empty($this->m_aData['from']['address']) && !empty($this->m_aData['to'])){ - $this->SetRecipientFrom($this->m_aData['to']); - } + if(empty($this->m_aData['from']['address']) && !empty($this->m_aData['to'])){ + $this->SetRecipientFrom($this->m_aData['to']); } + if ($bForceSynchronous) { return $this->SendSynchronous($aIssues, $oLog);