Improve make-archive.sh and update swiftmailer

This commit is contained in:
Frédéric Guillot
2014-09-19 15:29:39 +02:00
parent af69070a64
commit 0a9a4ba039
4 changed files with 28 additions and 81 deletions

View File

@@ -111,8 +111,13 @@ class Swift_Plugins_RedirectingPlugin implements Swift_Events_SendListener
$this->_filterHeaderSet($headers, 'Bcc');
// Add each hard coded recipient
$to = $message->getTo();
if (null === $to) {
$to = array();
}
foreach ( (array) $this->_recipient as $recipient) {
if (!array_key_exists($recipient, $message->getTo())) {
if (!array_key_exists($recipient, $to)) {
$message->addTo($recipient);
}
}
@@ -190,6 +195,8 @@ class Swift_Plugins_RedirectingPlugin implements Swift_Events_SendListener
if ($headers->has('X-Swift-To')) {
$message->setTo($headers->get('X-Swift-To')->getNameAddresses());
$headers->removeAll('X-Swift-To');
} else {
$message->setTo(null);
}
if ($headers->has('X-Swift-Cc')) {