Witam, mam taki fragment kodu który służy do łączenia się ze skrzynką pocztową.
if ($emails) {
/* begin output var */
$output = '';
/* put the newest emails on top */
rsort($emails);
$tresc='';
/* for every email... */
foreach ($emails as $email_number) {
/* get information specific to this email */
$overview = imap_fetch_overview($inbox, $email_number, 0);
$message = imap_fetchbody($inbox, $email_number, 1);
/* output the email header information */
$output .= '<div class="subject">' . imap_utf8($overview[0]->subject) . '</div> ';
$output .= '<div class="from">' . imap_utf8($overview[0]->from) . '</div>';
$output .= '<div class="date">on ' . $overview[0]->date . '</div>';
/* output the email body */
$tresc=$message;
$output .= '<div class="body">'.$tresc.'</div>';
}
echo $tresc);
// imap_utf8($tresc);
}
Mail zostaje pobrany dobrze - ale $message nie jest w formacie UTF8. Próbowałem używać funkcji base64_decode,imap_utf8 iconv - niestety przykładowa "Treść testowa" maila jest wyświetlana jako "Tre=C5=9B=C4=87=20testowa" jak mogę przerobić taki string aby był wyświetlany jako UTF8?