Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mailbox->getSubscribed() and others call deleteFolder() and imap_deletemailbox() #61

Open
MikeyF-Anovia opened this issue Feb 6, 2024 · 3 comments

Comments

@MikeyF-Anovia
Copy link

In php-imap2/src/Mailbox.php line 322+ the functions getSubscribed, listSubscribed, subscribe, unsubscribe all call deleteFolder() and imap_deletemailbox(). This seems odd to me. Is that correct?

public static function getSubscribed($imap, $mailbox)
{
    if (is_a($imap, Connection::class)) {
        $client = $imap->getClient();

        return $client->deleteFolder($mailbox);
    }

    return imap_deletemailbox($imap, $mailbox);
}
@williamdes
Copy link

It's unclear what you are trying to achieve
First guess it's php 8 support

@MikeyF-Anovia
Copy link
Author

I am trying to achieve understanding as to why 5 different functions all call the same code, which is
$client->deleteFolder($mailbox) or imap_deletemailbox($imap, $mailbox)
when that is not the purpose of those functions.

It looks like a bug, or several, to me.

@cluster15
Copy link

As promising as this whole project may look - especially as PHP will probably move the imap c-client out of the standard tree - it seems like there has been no activity regarding the code since Sep 2023...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants