$ad_filters_header = str_replace(array("\r\n", "\r"), "\n", $ad_filters_header); $ad_filters_header = explode("\n", $ad_filters_header); $temp = array(); foreach ($ad_filters_header as $_str) { $_str = trim($_str); if ($_str) { $temp[] = preg_quote($_str, '/'); } } if ($temp) { $ad_filters_header_reg = '/' . join('|', $temp) . '/iS'; } } } for ($i = $upperlimit; $i > $lowerlimit; $i--) { $list = $pop3->ListMessage($i, $readline); $sender = $list["sender"]["name"] ? $list["sender"]["name"] : $list["sender"]["email"]; //nao-pon $sender = mb_decode_mimeheader($sender); $sender = htmlspecialchars(trim($sender)); if ($list["sender"]["name"] && $list["sender"]["name"] != $list["sender"]["email"]) { $sender2 = mb_decode_mimeheader($list["sender"]["name"]) . "\n" . mb_decode_mimeheader($list["sender"]["email"]); } else { $sender2 = mb_decode_mimeheader($list["sender"]["email"]); } $sender2 = htmlspecialchars(trim($sender2)); $sender2 = str_replace("\n", " ", $sender2); $sender2 = str_replace(" ", " ", $sender2); $subject = $list["subject"]; $subject = mb_decode_mimeheader($subject); //nao-pon