Conditionally save current recipients
Conditionally save current recipients

* Swift_Plugins_RedirectingPlugin::beforeSendPerformed() does not check for the existence of headers before setting their X-Swift equivalent.
* Swift_Plugins_RedirectingPlugin::_restoreMessage_restoreMessage() does check if the X-Swift equivalent exists before restoring the actual header.

This leads to the possibility that although the cc and bcc headers were not originally set they will be set once the message is restored. This in turn leads to unexpected behaviour when checking for a headers existence with Swift_Mime_HeaderSet::has().

This patch checks for the existence of headers before setting their X-Swift equivalent.


denpamusic/swiftmailer,gburyakovsky/swiftmailer,papagel/swiftmailer,fvosberg/swiftmailer,Pardot/swiftmailer,jamesggordon/swiftmailer,UofSC/php-shared-functions,c960657/swiftmailer,tweakers-dev/swiftmailer,gburyakovsky/swiftmailer,michabbb-backup/swiftmailer,papagel/swiftmailer,fvosberg/swiftmailer,swiftmailer/swiftmailer,tweakers-dev/swiftmailer,kuslahne/swiftmailer,Pardot/swiftmailer,peterkokot/swiftmailer,Pardot/swiftmailer,Chhunlong/swiftmailer,denpamusic/swiftmailer,voku/swiftmailer,zghosts/swiftmailer,c960657/swiftmailer,Dubz/swiftmailer,gencer/swiftmailer,handautsav/swiftmailer,kuslahne/swiftmailer,deguif/swiftmailer,swiftmailer/swiftmailer,deguif/swiftmailer,Chhunlong/swiftmailer,Pardot/swiftmailer,gencer/swiftmailer,robertklein/swiftmailer,jamesggordon/swiftmailer,peterkokot/swiftmailer,UofSC/php-shared-functions,Rotzbua/swiftmailer,michabbb-backup/swiftmailer,robertklein/swiftmailer,Dubz/swiftmailer,peterkokot/swiftmailer,UofSC/php-shared-functions,Rotzbua/swiftmailer,voku/swiftmailer,handautsav/swiftmailer,zghosts/swiftmailer