开发者

How to switch folders of pop3 mailboxes using PHP IMAP

开发者 https://www.devze.com 2023-02-23 05:35 出处:网络
I\'m pretty sure there\'s full support for pop3 inboxes in the PHP IMap library, but I\'m not able to find folders other than the inbox.Is it possible to gather other folders using php imap library fo

I'm pretty sure there's full support for pop3 inboxes in the PHP IMap library, but I'm not able to find folders other than the inbox. Is it possible to gather other folders using php imap library for pop3 emails?

Here's the function I'm using to test

function allFolderMailCount($connection,$server)
{
    $list = imap_getmailboxes($connection, $server, "*");
    if (is_array($list)) 
    {
        foreach ($list as $key => $val) 
        {
            $folderEmails .= $val->name . '  ---- ' . email_folder_count($connection, $val->开发者_Python百科;name);
        }
    } 
    else 
    {
       $folderEmails .= "imap_getmailboxes failed: " . imap_last_error() . "\n";
    }
    return $folderEmails;
}


POP3 does not have the notion of "folders". What you want to do is therefore impossible. Switch to the IMAP protocol if you need support for folders.

0

精彩评论

暂无评论...
验证码 换一张
取 消