Skip to content
Snippets Groups Projects
Commit 2ae68f97 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

use CRLF in quoted printable encoding FS#1755

Needs testing from:

a) Exchange users - is FS1755 fixed for you?
b) everone else - all okay still?
parent 3f803e5e
No related branches found
No related tags found
Loading
......@@ -11,6 +11,7 @@ if(!defined('DOKU_INC')) die('meh.');
// end of line for mail lines - RFC822 says CRLF but postfix (and other MTAs?)
// think different
if(!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL',"\n");
if(!defined('QUOTEDPRINTABLE_EOL')) define('QUOTEDPRINTABLE_EOL',"\015\012");
#define('MAILHEADER_ASCIIONLY',1);
/**
......@@ -254,11 +255,11 @@ function mail_quotedprintable_encode($sText,$maxlen=74,$bEmulate_imap_8bit=true)
// but this wouldn't be caught by such an easy RegExp
if($maxlen){
preg_match_all( '/.{1,'.($maxlen - 2).'}([^=]{0,2})?/', $sLine, $aMatch );
$sLine = implode( '=' . MAILHEADER_EOL, $aMatch[0] ); // add soft crlf's
$sLine = implode( '=' . QUOTEDPRINTABLE_EOL, $aMatch[0] ); // add soft crlf's
}
}
// join lines into text
return implode(MAILHEADER_EOL,$aLines);
return implode(QUOTEDPRINTABLE_EOL,$aLines);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment