aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/network.php b/include/network.php
index 12f2ad4e9..3e8134a32 100644
--- a/include/network.php
+++ b/include/network.php
@@ -874,13 +874,16 @@ function xml2array($contents, $namespaces = true, $get_attributes=1, $priority =
}
-function email_header_encode($in_str, $charset = 'UTF-8') {
+function email_header_encode($in_str, $charset = 'UTF-8', $header = 'Subject') {
+
+
$out_str = $in_str;
$need_to_convert = false;
for($x = 0; $x < strlen($in_str); $x ++) {
if((ord($in_str[$x]) == 0) || ((ord($in_str[$x]) > 128))) {
$need_to_convert = true;
+ break;
}
}
@@ -896,7 +899,7 @@ function email_header_encode($in_str, $charset = 'UTF-8') {
// determine length of encoded text within chunks
// and ensure length is even
- $length = 75 - strlen($start) - strlen($end);
+ $length = 75 - strlen($start) - strlen($end) - (strlen($header) + 2);
/*
[EDIT BY danbrown AT php DOT net: The following