original_string: protected function _prepareHeaders($headers)
      {
          if (!$this->_mail) {
              /**
               * @see Zend_Mail_Transport_Exception
               */
              // require_once 'Zend/Mail/Transport/Exception.php';
              throw new Zend_Mail_Transport_Exception('Missing Zend_Mail object in _mail property');
          }
  
          $this->header = '';
  
          foreach ($headers as $header => $content) {
              if (isset($content['append'])) {
                  unset($content['append']);
                  $value = implode(',' . $this->EOL . ' ', $content);
                  $this->header .= $header . ': ' . $value . $this->EOL;
              } else {
                  array_walk($content, array(get_class($this), '_formatHeader'), $header);
                  $this->header .= implode($this->EOL, $content) . $this->EOL;
              }
          }
  
          // Sanity check on headers -- should not be > 998 characters
          $sane = true;
          foreach (explode($this->EOL, $this->header) as $line) {
              if (strlen(trim($line)) > 998) {
                  $sane = false;
                  break;
              }
          }
          if (!$sane) {
              /**
               * @see Zend_Mail_Transport_Exception
               */
              // require_once 'Zend/Mail/Transport/Exception.php';
              throw new Zend_Mail_Exception('At least one mail header line is too long');
          }
      }
code: protected function _prepareHeaders($headers)
      {
          if (!$this->_mail) {
              /**
               * @see Zend_Mail_Transport_Exception
               */
              // require_once 'Zend/Mail/Transport/Exception.php';
              throw new Zend_Mail_Transport_Exception('Missing Zend_Mail object in _mail property');
          }
  
          $this->header = '';
  
          foreach ($headers as $header => $content) {
              if (isset($content['append'])) {
                  unset($content['append']);
                  $value = implode(',' . $this->EOL . ' ', $content);
                  $this->header .= $header . ': ' . $value . $this->EOL;
              } else {
                  array_walk($content, array(get_class($this), '_formatHeader'), $header);
                  $this->header .= implode($this->EOL, $content) . $this->EOL;
              }
          }
  
          // Sanity check on headers -- should not be > 998 characters
          $sane = true;
          foreach (explode($this->EOL, $this->header) as $line) {
              if (strlen(trim($line)) > 998) {
                  $sane = false;
                  break;
              }
          }
          if (!$sane) {
              /**
               * @see Zend_Mail_Transport_Exception
               */
              // require_once 'Zend/Mail/Transport/Exception.php';
              throw new Zend_Mail_Exception('At least one mail header line is too long');
          }
      }
code_tokens: protected function _prepareHeaders ( $ headers ) { if ( ! $ this -> _mail ) { /**
               * @see Zend_Mail_Transport_Exception
               */ // require_once 'Zend/Mail/Transport/Exception.php'; throw new Zend_Mail_Transport_Exception ( 'Missing Zend_Mail object in _mail property' ) ; } $ this -> header = '' ; foreach ( $ headers as $ header => $ content ) { if ( isset ( $ content [ 'append' ] ) ) { unset ( $ content [ 'append' ] ) ; $ value = implode ( ',' . $ this -> EOL . ' ' , $ content ) ; $ this -> header .= $ header . ': ' . $ value . $ this -> EOL ; } else { array_walk ( $ content , array ( get_class ( $ this ) , '_formatHeader' ) , $ header ) ; $ this -> header .= implode ( $ this -> EOL , $ content ) . $ this -> EOL ; } } // Sanity check on headers -- should not be > 998 characters $ sane = true ; foreach ( explode ( $ this -> EOL , $ this -> header ) as $ line ) { if ( strlen ( trim ( $ line ) ) > 998 ) { $ sane = false ; break ; } } if ( ! $ sane ) { /**
               * @see Zend_Mail_Transport_Exception
               */ // require_once 'Zend/Mail/Transport/Exception.php'; throw new Zend_Mail_Exception ( 'At least one mail header line is too long' ) ; } }
docstring: Prepare header string for use in transport
  
  Prepares and generates {@link $header} based on the headers provided.
  
  @param mixed $headers
  @access protected
  @return void
  @throws Zend_Mail_Transport_Exception if any header lines exceed 998
  characters
docstring_tokens: Prepare header string for use in transport