|
|
|
| всем привет!
получаю почту так :
$imap = imap_open("{localhost:143/imap/notls}INBOX", "логин", "пасс");
$message_count = imap_num_msg($imap);
for ($i = 1; $i <= $message_count; $i++){
$header = imap_header($imap, $i);
$body = imap_fetchbody($imap, $i, "1.1");
if ($body == ""){
$body = imap_fetchbody($imap, $i, "1");
}
$email[$i]['from'] = $header->from[0]->mailbox.'@'.$header->from[0]->host;
$email[$i]['fromaddress'] = $header->from[0]->personal;
$email[$i]['to'] = $header->to[0]->mailbox;
$email[$i]['subject'] = $header->subject;
$email[$i]['reply_to'] = $header->reply_to[0]->mailbox.'@'.$header->reply_to[0]->host;
$email[$i]['message_id'] = $header->message_id;
$email[$i]['date'] = $header->udate;
$email[$i]['body'] = $body;
$from = $email[$i]['fromaddress'];
$from_email = $email[$i]['from'];
}
imap_close($imap);
echo '<pre>';
print_r($email);
echo '</pre>';
|
так вот в теле сообщения весь текст отображается крякозябрами .
подскажите как получить нормальный текст ? | |
|
|
|
|
|
|
|
для: dima2207
(06.05.2010 в 21:45)
| | неплохо было бы само письмо приложить. Может там кракозябры и есть. | |
|
|
|
|
|
|
|
для: Trianon
(07.05.2010 в 06:24)
| | нет , в оригинале все нормально , крякозябрами отображатся только русские буквы например :
п■п╟я┌п╟ п╫п╟я┤п╟п╩п╟:
я так понимаю что то с кодировкой отображения ? | |
|
|
|