summaryrefslogtreecommitdiff
path: root/inc/mail.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-06-06 21:19:53 +0200
committerAndreas Gohr <andi@splitbrain.org>2006-06-06 21:19:53 +0200
commit29f3a5fae4c9a8b6d280d2ca185424814354ae04 (patch)
treea66a0b26af53d74ac1cef09ae31cb7e2714c60ce /inc/mail.php
parent5f312baccd3f152f55bb9ce0364cc18a99191959 (diff)
downloadrpg-29f3a5fae4c9a8b6d280d2ca185424814354ae04.tar.gz
rpg-29f3a5fae4c9a8b6d280d2ca185424814354ae04.tar.bz2
user the MAILHEADER_EOL in quoted printable encoding
darcs-hash:20060606191953-7ad00-0e8098d5d8f4cf5379f3cce0e6899ac11c20a321.gz
Diffstat (limited to 'inc/mail.php')
-rw-r--r--inc/mail.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/inc/mail.php b/inc/mail.php
index da2368af2..a596c38f7 100644
--- a/inc/mail.php
+++ b/inc/mail.php
@@ -9,7 +9,9 @@
if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/');
require_once(DOKU_INC.'inc/utf8.php');
- define('MAILHEADER_EOL',"\n"); //end of line for mail headers
+ // end of line for mail lines - RFC822 says CRLF but postfix (and other MTAs?)
+ // think different
+ if(!defined('MAILHEADER_EOL')) define('MAILHEADER_EOL',"\n");
#define('MAILHEADER_ASCIIONLY',1);
/**
@@ -210,12 +212,12 @@ 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( '=' . chr(13).chr(10), $aMatch[0] ); // add soft crlf's
+ $sLine = implode( '=' . MAILHEADER_EOL, $aMatch[0] ); // add soft crlf's
}
}
// join lines into text
- return implode(chr(13).chr(10),$aLines);
+ return implode(MAILHEADER_EOL,$aLines);
}