mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-15 11:11:49 +01:00
Fix mail merge into mail template excluded BCC
This commit is contained in:
parent
fa2403f905
commit
48239f3506
@ -7011,10 +7011,14 @@ class Mail
|
||||
// Parse destinations for placeholders
|
||||
foreach(Mailer::$type2header as $type => $h)
|
||||
{
|
||||
$merged = $bo_merge->merge_string($mailObject->getHeader(Mailer::$type2header[$type]),$val,$e,'text/plain',array(),self::$displayCharset);
|
||||
$header = $mailObject->getHeader(Mailer::$type2header[$type]);
|
||||
if(is_array($header)) $header = implode(', ',$header);
|
||||
$mailObject->clearAddresses($type);
|
||||
$merged = $bo_merge->merge_string($header,$val,$e,'text/plain',array(),self::$displayCharset);
|
||||
//error_log($type . ': ' . $mailObject->getHeader(Mailer::$type2header[$type]) . ' -> ' .$merged);
|
||||
$mailObject->addAddress(trim($merged,'"'),'',$type);
|
||||
}
|
||||
$mailObject->forceBccHeader();
|
||||
|
||||
// No addresses from placeholders? Treat it as just a contact ID
|
||||
if (count($mailObject->getAddresses('to',true)) == 0 &&
|
||||
|
@ -763,6 +763,7 @@ class Mailer extends Horde_Mime_Mail
|
||||
*/
|
||||
function getHeader($header)
|
||||
{
|
||||
if(strtolower($header) === 'bcc') return $this->bcc->addresses;
|
||||
return $this->_headers ? $this->_headers->getValue($header) : null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user