Hi,
When $mailbox string ends with '/' it doesn't subscribe and doesn't return any error. You need to rtrim this character.(PHP 4, PHP 5, PHP 7, PHP 8)
imap_subscribe — Subscribe to a mailbox
imapIMAP\Connection 实例。
mailboxThe mailbox name, see imap_open() for more information
Passing untrusted data to this parameter is insecure, unless imap.enable_insecure_rsh is disabled.
| 版本 | 说明 | 
|---|---|
| 8.1.0 | 现在 imap参数接受 IMAP\Connection
  实例,之前接受有效的imapresource。 | 
