N°3287 - Set from display name / label in action email

Co-authored-by: Thomas Casteleyn <thomas.casteleyn@me.com>
This commit is contained in:
Lars Kaltefleiter
2020-09-03 16:44:31 +02:00
committed by Molkobain
parent 11f00cc229
commit 43cadb0ede
17 changed files with 139 additions and 71 deletions

View File

@@ -100,7 +100,7 @@ class EMail
}
if (array_key_exists('reply_to', $aData))
{
$oMessage->SetRecipientReplyTo($aData['reply_to']);
$oMessage->SetRecipientReplyTo($aData['reply_to']['address'], $aData['reply_to']['label']);
}
if (array_key_exists('to', $aData))
{
@@ -465,10 +465,14 @@ class EMail
}
}
public function SetRecipientReplyTo($sAddress)
public function SetRecipientReplyTo($sAddress, $sLabel = '')
{
$this->m_aData['reply_to'] = $sAddress;
if (!empty($sAddress))
$this->m_aData['reply_to'] = array('address' => $sAddress, 'label' => $sLabel);
if ($sLabel != '')
{
$this->m_oMessage->setReplyTo(array($sAddress => $sLabel));
}
else if (!empty($sAddress))
{
$this->m_oMessage->setReplyTo($sAddress);
}