private static function encodeAttachment($boundary, FsPath $path, $fileName, $charset, $encoding, $eol = "\n") {
		$file = new FsPath($fileName);
		$string = "--{$boundary}{$eol}"
			. "Content-Type: " . self::getMimeType($file->getExtension()) . "; name=\"" . mb_encode_mimeheader($file->getName(), $charset, 'Q', $eol) . "\"" . $eol
			. "Content-Disposition: attachment; filename=\"" . mb_encode_mimeheader($file->getName(), $charset, 'Q', $eol) . "\"" . $eol
			. "Content-Transfer-Encoding: " . self::ENCODING_BASE64 . $eol . $eol;
		$string .= self::encodeString(IoUtils::getContents($path), 'base64', $eol);
		return $string;
	}
private static function encodeAttachment($boundary, FsPath $path, $fileName, $charset, $encoding, $eol = "\n") {
		$file = new FsPath($fileName);
		$string = "--{$boundary}{$eol}"
			. "Content-Type: " . self::getMimeType($file->getExtension()) . "; name=\"" . mb_encode_mimeheader($file->getName(), $charset, 'Q', $eol) . "\"" . $eol
			. "Content-Disposition: attachment; filename=\"" . mb_encode_mimeheader($file->getName(), $charset, 'Q', $eol) . "\"" . $eol
			. "Content-Transfer-Encoding: " . self::ENCODING_BASE64 . $eol . $eol;
		$string .= self::encodeString(IoUtils::getContents($path), 'base64', $eol);
		return $string;
	}
private static function encodeAttachment ( $ boundary , FsPath $ path , $ fileName , $ charset , $ encoding , $ eol = "\n" ) { $ file = new FsPath ( $ fileName ) ; $ string = "--{$boundary}{$eol}" . "Content-Type: " . self :: getMimeType ( $ file -> getExtension ( ) ) . "; name=\"" . mb_encode_mimeheader ( $ file -> getName ( ) , $ charset , 'Q' , $ eol ) . "\"" . $ eol . "Content-Disposition: attachment; filename=\"" . mb_encode_mimeheader ( $ file -> getName ( ) , $ charset , 'Q' , $ eol ) . "\"" . $ eol . "Content-Transfer-Encoding: " . self :: ENCODING_BASE64 . $ eol . $ eol ; $ string .= self :: encodeString ( IoUtils :: getContents ( $ path ) , 'base64' , $ eol ) ; return $ string ; }
encodes an attachment
@param string $boundary
@param FsPath $path
@param string $fileName
@param string $charset
@param string $encoding
@param string $eol
encodes an attachment