|
@@ 454-459 (lines=6) @@
|
| 451 |
|
|
| 452 |
|
// prepare addressee list; moved the adding of addresses to the mailobject down |
| 453 |
|
// to |
| 454 |
|
foreach(Mail::parseAddressList($mailObject->getHeader("To")) as $addressObject) { |
| 455 |
|
if (!$addressObject->valid) continue; |
| 456 |
|
ZLog::Write(LOGLEVEL_DEBUG,__METHOD__."(".__LINE__.") Header Sentmail To: ".array2string($addressObject) ); |
| 457 |
|
//$mailObject->AddAddress($addressObject->mailbox. ($addressObject->host ? '@'.$addressObject->host : ''),$addressObject->personal); |
| 458 |
|
$toMailAddr[] = imap_rfc822_write_address($addressObject->mailbox, $addressObject->host, $addressObject->personal); |
| 459 |
|
} |
| 460 |
|
// CC |
| 461 |
|
foreach(Mail::parseAddressList($mailObject->getHeader("Cc")) as $addressObject) { |
| 462 |
|
if (!$addressObject->valid) continue; |
|
@@ 461-466 (lines=6) @@
|
| 458 |
|
$toMailAddr[] = imap_rfc822_write_address($addressObject->mailbox, $addressObject->host, $addressObject->personal); |
| 459 |
|
} |
| 460 |
|
// CC |
| 461 |
|
foreach(Mail::parseAddressList($mailObject->getHeader("Cc")) as $addressObject) { |
| 462 |
|
if (!$addressObject->valid) continue; |
| 463 |
|
ZLog::Write(LOGLEVEL_DEBUG,__METHOD__."(".__LINE__.") Header Sentmail CC: ".array2string($addressObject) ); |
| 464 |
|
//$mailObject->AddCC($addressObject->mailbox. ($addressObject->host ? '@'.$addressObject->host : ''),$addressObject->personal); |
| 465 |
|
$ccMailAddr[] = imap_rfc822_write_address($addressObject->mailbox, $addressObject->host, $addressObject->personal); |
| 466 |
|
} |
| 467 |
|
// BCC |
| 468 |
|
foreach($mailObject->getAddresses('bcc') as $addressObject) { |
| 469 |
|
if (!$addressObject->valid) continue; |
|
@@ 468-473 (lines=6) @@
|
| 465 |
|
$ccMailAddr[] = imap_rfc822_write_address($addressObject->mailbox, $addressObject->host, $addressObject->personal); |
| 466 |
|
} |
| 467 |
|
// BCC |
| 468 |
|
foreach($mailObject->getAddresses('bcc') as $addressObject) { |
| 469 |
|
if (!$addressObject->valid) continue; |
| 470 |
|
ZLog::Write(LOGLEVEL_DEBUG,__METHOD__."(".__LINE__.") Header Sentmail BCC: ".array2string($addressObject) ); |
| 471 |
|
//$mailObject->AddBCC($addressObject->mailbox. ($addressObject->host ? '@'.$addressObject->host : ''),$addressObject->personal); |
| 472 |
|
$bccMailAddr[] = imap_rfc822_write_address($addressObject->mailbox, $addressObject->host, $addressObject->personal); |
| 473 |
|
} |
| 474 |
|
$mailObject->clearAllRecipients(); |
| 475 |
|
|
| 476 |
|
$use_orgbody = false; |