|
@@ -141,22 +141,6 @@ class EMail
|
|
$oHeaders = $this->m_oMessage->getHeaders();
|
|
$oHeaders = $this->m_oMessage->getHeaders();
|
|
switch(strtolower($sKey))
|
|
switch(strtolower($sKey))
|
|
{
|
|
{
|
|
- case 'from':
|
|
|
|
- case 'cc':
|
|
|
|
- case 'bcc':
|
|
|
|
- $aMatches = array();
|
|
|
|
- // Header may be in the form: John Doe <jd@company.com>
|
|
|
|
- if (preg_match('/^([^<]+) <([^>]+)>$/', $sValue, $aMatches))
|
|
|
|
- {
|
|
|
|
- $aHeader = array($aMatches[2] => $aMatches[1]);
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- $aHeader = array($sValue);
|
|
|
|
- }
|
|
|
|
- $oHeaders->addMailboxHeader($sKey, $aHeader);
|
|
|
|
- break;
|
|
|
|
-
|
|
|
|
default:
|
|
default:
|
|
$oHeaders->addTextHeader($sKey, $sValue);
|
|
$oHeaders->addTextHeader($sKey, $sValue);
|
|
}
|
|
}
|
|
@@ -205,7 +189,8 @@ class EMail
|
|
|
|
|
|
public function SetRecipientTO($sAddress)
|
|
public function SetRecipientTO($sAddress)
|
|
{
|
|
{
|
|
- $this->m_oMessage->setTo($sAddress);
|
|
|
|
|
|
+ $aAddresses = explode(', ', $sAddress);
|
|
|
|
+ $this->m_oMessage->setTo($aAddresses);
|
|
}
|
|
}
|
|
|
|
|
|
public function GetRecipientTO($bAsString = false)
|
|
public function GetRecipientTO($bAsString = false)
|
|
@@ -236,12 +221,14 @@ class EMail
|
|
|
|
|
|
public function SetRecipientCC($sAddress)
|
|
public function SetRecipientCC($sAddress)
|
|
{
|
|
{
|
|
- $this->AddToHeader('Cc', $sAddress);
|
|
|
|
|
|
+ $aAddresses = explode(', ', $sAddress);
|
|
|
|
+ $this->m_oMessage->setCc($aAddresses);
|
|
}
|
|
}
|
|
|
|
|
|
public function SetRecipientBCC($sAddress)
|
|
public function SetRecipientBCC($sAddress)
|
|
{
|
|
{
|
|
- $this->AddToHeader('Bcc', $sAddress);
|
|
|
|
|
|
+ $aAddresses = explode(', ', $sAddress);
|
|
|
|
+ $this->m_oMessage->setBcc($aAddresses);
|
|
}
|
|
}
|
|
|
|
|
|
public function SetRecipientFrom($sAddress, $sLabel = '')
|
|
public function SetRecipientFrom($sAddress, $sLabel = '')
|
|
@@ -258,7 +245,7 @@ class EMail
|
|
|
|
|
|
public function SetRecipientReplyTo($sAddress)
|
|
public function SetRecipientReplyTo($sAddress)
|
|
{
|
|
{
|
|
- $this->AddToHeader('Reply-To', $sAddress);
|
|
|
|
|
|
+ $this->m_oMessage->setReplyTo($sAddress);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|