mailer.php
protected function encodeHeader($str) {
		if (extension_loaded('iconv')) {
			$out = iconv_mime_encode('Subject', $str,
				['input-charset' => 'UTF-8', 'output-charset' => $this->charset]);
			$out = substr($out, strlen('Subject: '));
		} elseif(extension_loaded('mbstring')) {
			mb_internal_encoding('UTF-8');
			$out = mb_encode_mimeheader($str, $this->charset, 'B', static::$EOL, strlen('Subject: '));
		} else
			$out = wordwrap($str,65,static::$EOL);
		return $out;
	}
protected function encodeHeader($str) {
		if (extension_loaded('iconv')) {
			$out = iconv_mime_encode('Subject', $str,
				['input-charset' => 'UTF-8', 'output-charset' => $this->charset]);
			$out = substr($out, strlen('Subject: '));
		} elseif(extension_loaded('mbstring')) {
			mb_internal_encoding('UTF-8');
			$out = mb_encode_mimeheader($str, $this->charset, 'B', static::$EOL, strlen('Subject: '));
		} else
			$out = wordwrap($str,65,static::$EOL);
		return $out;
	}
protected function encodeHeader ( $ str ) { if ( extension_loaded ( 'iconv' ) ) { $ out = iconv_mime_encode ( 'Subject' , $ str , [ 'input-charset' => 'UTF-8' , 'output-charset' => $ this -> charset ] ) ; $ out = substr ( $ out , strlen ( 'Subject: ' ) ) ; } elseif ( extension_loaded ( 'mbstring' ) ) { mb_internal_encoding ( 'UTF-8' ) ; $ out = mb_encode_mimeheader ( $ str , $ this -> charset , 'B' , static :: $ EOL , strlen ( 'Subject: ' ) ) ; } else $ out = wordwrap ( $ str , 65 , static :: $ EOL ) ; return $ out ; }
encode and split header strings
@param $str
@return string
encode and split header strings