Allow specifying the label of the sender email

SVN:trunk[1650]
This commit is contained in:
Denis Flaven
2011-10-28 12:41:20 +00:00
parent e00c32b867
commit 14b86abdbe

View File

@@ -145,6 +145,8 @@ class EMail
public function SetMessageId($sId)
{
// Note: Swift will add the angle brackets for you
// so let's remove the angle brackets if present, for historical reasons
$sId = str_replace(array('<', '>'), '', $sId);
$this->m_oMessage->SetId($sId);
}
@@ -219,9 +221,16 @@ class EMail
$this->AddToHeader('Bcc', $sAddress);
}
public function SetRecipientFrom($sAddress)
public function SetRecipientFrom($sAddress, $sLabel = '')
{
$this->m_oMessage->setFrom($sAddress);
if ($sLabel != '')
{
$this->m_oMessage->setFrom(array($sAddress => $sLabel));
}
else
{
$this->m_oMessage->setFrom($sAddress);
}
}
public function SetRecipientReplyTo($sAddress)