D
D
Denis2017-02-07 17:15:10
PHP
Denis, 2017-02-07 17:15:10

How to fix problems with imap_utf7_decode()?

You need to get a list of folders in Yandex mail.
Writing:

$mailbox = '{imap.yandex.ru:993/imap/ssl/novalidate-cert}';
  $mbox = imap_open($mailbox, $login, $password);
  $folders = imap_list($mbox, $mailbox, '*');
  foreach ($folders as $folder) {
    echo imap_utf7_decode($folder).'<br />';
  }

Issues:
{imap.yandex.ru:993/imap/ssl/novalidate-cert}[email protected];5==K5
{imap.yandex.ru:993/imap/ssl/novalidate-cert}AE>4OI85
{imap.yandex .ru:993/imap/ssl/novalidate-cert}!?0<
{imap.yandex.ru:993/imap/ssl/novalidate-cert}"!"/
{imap.yandex.ru:993/imap/ssl /novalidate-cert}#40;5==K5
{imap.yandex.ru:993/imap/ssl/novalidate-cert}'[email protected]=>28:8
{imap.yandex.ru:993/imap/ssl/ novalidate-cert}INBOX
{imap.yandex.ru:993/imap/ssl/novalidate-cert }TEST

Tell me, who faced such a problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis, 2017-02-07
@DenPhp

A friend and a good specialist helped with the answer.
Answer is here - first comment php.net/manual/ru/function.imap-utf7-decode.php
Discussion here - xpoint.ru/forums/programming/PHP/thread/44035.xhtml

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question