X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Femail.php;h=3e6a8186d8fb9eafdc541696220aa3d2d4e16935;hb=64d0616762efcff413a335f2fdde4d8219d44895;hp=b3408454904dd13dad0e98d5ec902966dcf22d1b;hpb=da05ef2ae48beb0f3475cc705fde9a69e5947426;p=friendica.git diff --git a/include/email.php b/include/email.php old mode 100644 new mode 100755 index b340845490..3e6a8186d8 --- a/include/email.php +++ b/include/email.php @@ -169,6 +169,17 @@ function email_get_part($mbox,$uid,$p,$partno) { function email_header_encode($in_str, $charset) { $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; + } + } + + if(! $need_to_convert) + return $in_str; + if ($out_str && $charset) { // define start delimimter, end delimiter and spacer