/**
  * Restore a changed message back to its original state
  *
  * @param \Swift_Mime_Message $message
  */
 protected function restoreMessage(\Swift_Mime_Message $message)
 {
     if (count($this->attachments) > 0) {
         foreach ($this->attachments as $attachment) {
             $message->detach($attachment);
         }
         $this->attachments = array();
     }
 }